=== Safari-111 ===

2003-10-24  Richard Williamson   <rjw@apple.com>

	Fixed 3425358.  Don't try to create page cache for pages that
	have a nil view().

        Reviewed by Hyatt.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge saveDocumentToPageCache]):

2003-10-24  David Hyatt  <hyatt@apple.com>

	Fix for 3133375, the minwidth computation for pres is wrong.  There were a couple of bugs here.
	One is that pres only should have a breakable character if they contain a newline.  Otherwise they're
	treated essentially like nowrap.  The other was that m_beginMinWidth and m_endMinWidth needed to be
	set to the maxwidth of the first line and the maxwidth of the last line respectively for pres instead of
	being only the first and last words.
	
        Reviewed by mjs

        * khtml/rendering/render_text.cpp:
        (RenderText::calcMinMaxWidth):

2003-10-24  David Hyatt  <hyatt@apple.com>

	Two fixes to the computation of min/max width for text runs.
	(1) Make sure that pre runs don't add in word-spacing to the last word on a line (e.g., when a newline explicitly
	breaks a pre).
	(2) Fix a bug where breakable characters weren't getting factored into minwidth properly.  When a word got broken
	because of a breakable character, we were treating the breakable character like a space, and not including its
	width as part of the minimum width of the text run.
	
        Reviewed by john

        * khtml/rendering/render_text.cpp:
        (RenderText::calcMinMaxWidth):

2003-10-23  David Hyatt  <hyatt@apple.com>

	This patch fixes the pseudo-elements ::first-line and ::first-letter to inherit styles properly.  More
	specifically it does the following:

	(1) Implements caching of pseudo-styles once computed off the style() which originated the pseudo-style.
	The old code did this, and this was a regression from my previous patch.

	(2) Fixes first-letter checking so that it happens at layout time rather than during render object
	construction time, since that makes first-letter more dynamic and causes it to be discovered in cases
	where it was being missed before.  This fixes the front page of meyerweb.com.

	(3) Make first-letter inherit from first-line like it's supposed to, and also make first-line styles
	cross blocks and inherit properly from enclosing containers.

	(4) Make first-letter changes cause a detach/attach to fire just as when the display changes.  I generalized
	the notion of needing to detach on a style change by making it a new kind of hint in dom_nodeimpl's style
	diff function.

	(5) Fixed isBlockFlow to return true for inline-blocks.
	
        Reviewed by john

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::addChildToFlow):
        (khtml::RenderBlock::layoutBlock):
        (khtml::RenderBlock::getFirstLineBox):
        (khtml::RenderBlock::firstLineBlock):
        (khtml::RenderBlock::updateFirstLetter):
        * khtml/rendering/render_block.h:
        (khtml::RenderBlock::isBlockFlow):
        * khtml/rendering/render_line.cpp:
        (InlineFlowBox::paintBackgroundAndBorder):
        * khtml/rendering/render_list.cpp:
        (RenderListItem::setStyle):
        * khtml/rendering/render_object.cpp:
        (RenderObject::RenderObject):
        (RenderObject::firstLineBlock):
        (RenderObject::updateFirstLetter):
        (RenderObject::dump):
        (RenderObject::setStyle):
        (RenderObject::recalcMinMaxWidths):
        (RenderObject::style):
        (RenderObject::getPseudoStyle):
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::overhangingContents):
        * khtml/rendering/render_style.cpp:
        (pseudoBit):
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::):
        * khtml/rendering/render_table.cpp:
        (RenderTable::firstLineBlock):
        (RenderTable::updateFirstLetter):
        * khtml/rendering/render_table.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::paintObject):
        (RenderText::htmlFont):
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::recalcStyle):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::diff):
        * khtml/xml/dom_nodeimpl.h:
        (DOM::NodeImpl::):

2003-10-23  Ken Kocienda  <kocienda@apple.com>

        Reviewed by David

	Fix for these bugs:

	<rdar://problem/3171929>: Safari picks a different button in a 
	form when you hit return if the first button has no name
	<rdar://problem/3200386>: investigate which button is activated 
	when hitting return in form text input fields

	HTML spec says that buttons must have names to be considered
	successful. However, other browsers do not impose this constraint.
	Therefore, we behave differently, and can use different buttons than
	the author intended.

        * khtml/html/html_formimpl.cpp:
        (HTMLButtonElementImpl::isSuccessfulSubmitButton)
        (HTMLInputElementImpl::isSuccessfulSubmitButton)

2003-10-22  David Hyatt  <hyatt@apple.com>

	Fix for 3460726, the user agent string was returning nil.  

	Fix for 3386544, empty documents did not get a layout, and so they looked white.  Also fixed the positioning
	of widgets to account for border/padding in updateWidgetPositions.

	Fix for espn.com crasher, 3458143, caused by layout object not being properly cleared when layouts were
	unscheduled.
	
        Reviewed by darin

        * khtml/khtmlview.cpp:
        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::RenderCanvas):
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::updateWidgetPositions):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::userAgent):

2003-10-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by 

	- fixed 3460664 - Exception handlers not properly removed
	
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::mouseMoved): Don't return from exception block
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Add exception blocking (whoops)

2003-10-22  John Sullivan  <sullivan@apple.com>

	- fixed 3460652 -- REGRESSION (100-110+): Can't tab out of a 
	frameset page

        Reviewed by Darin (actually he made the change on my machine)

        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameSetElementImpl::defaultEventHandler):
	only set defaultHandled for the one event that we actually
	handle (mouse event to resize frame borders); this was always
	being set, hence preventing key events from being used elsewhere.

2003-10-22  Richard Williamson   <rjw@apple.com>

	Fixed 3454067.  RenderText's repaint wasn't called because of recent changes to de-virtualize repaint.  Modified getAbsoluteRepaintRect() to return containing block's getAbsoluteRepaintRect().
	
	Also removed the long standing +1 from QFontMetrics::height().

        Reviewed by Hyatt.

        * khtml/rendering/render_text.cpp:
        (RenderText::getAbsoluteRepaintRect):
        * khtml/rendering/render_text.h:
        * kwq/KWQFontMetrics.mm:
        (QFontMetrics::height):

2003-10-22  David Hyatt  <hyatt@apple.com>

	Fix visibility to be done when widgets are added or when styles are set rather than at paint time.  Fixes
	the ads painting on top of content at tvguide.com.
	
        Reviewed by cblu

        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::setQWidget):
        (RenderWidget::setStyle):
        (RenderWidget::paintObject):
        * kwq/KWQWidget.h:
        * kwq/KWQWidget.mm:
        (QWidget::QWidget):
        (QWidget::show):
        (QWidget::hide):

2003-10-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	Finished exception blocking changes, so now I can finally say:

	- fixed 3137084 - Many non-reproducible crashers in ContextImp::mark / ScopeChain::mark
	- fixed 3308848 - nil-deref in KHTMLView::topLevelWidget
	- fixed 3311511 - nil deref inside KJS::Screen
	- fixed 3397422 - 7B51: Safari crashed in KJS::ObjectImp::mark()
	- fixed 3408373 - Panther7B58 : Safari Crashed in KJS::ObjectImp::mark
	- fixed 3409307 - 7B55: safari crashed in KJS::Interpreter::globalExec() (idle, nothing particular going on)
	- fixed 3410160 - 7B60 Safari crashed in KHTMLPart::parentPart called from JS while in the background
	- fixed 3413224 - unrepro crash in KJS::Window::mark
	- fixed 3419940 - unrepro crash in KJS::Collector::allocate trying to access http://www.lindyinthepalms.com
	- fixed 3420123 - Panther7B66: Safari crashed while going to http://www.tangents.co.uk/index2.html
	- fixed 3423225 - Safari crash in vtable for KWQMapImpl (vtable for KWQMapImpl + 8).
	- fixed 3437190 - nil-deref on quit in calling marked() from ScopeChain::mark()

        * WebCore.pbproj/project.pbxproj:
        * kwq/KWQFontMetrics.mm:
        * kwq/KWQPainter.mm:
        (QPainter::drawPixmap):
        (QPainter::drawTiledPixmap):
        (QPainter::_updateRenderer):
        * kwq/WebCoreTextRenderer.h:

2003-10-21  David Hyatt  <hyatt@apple.com>

	http://placenamehere.com/safari/fixedbgtest.html is now fixed with a patch from the KHTML trunk.
	Fixed backgrounds repeated when they weren't supposed to.
	
        * khtml/rendering/render_box.cpp:
        (RenderBox::paintBackgroundExtended):

2003-10-21  David Hyatt  <hyatt@apple.com>

	Change pseudo-element style resolution to be lazy and to not occur until the style is actually asked
	for by the front end render objects.  Also fix first-letter to inherit properly from first-line styles.
	
        Reviewed by mjs

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::initForStyleResolve):
        (khtml::CSSStyleSelector::styleForElement):
        (khtml::CSSStyleSelector::pseudoStyleForElement):
        (khtml::CSSStyleSelector::checkSelector):
        (khtml::CSSStyleSelector::checkOneSelector):
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::addChildToFlow):
        * khtml/rendering/render_container.cpp:
        (RenderContainer::updatePseudoChild):
        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):
        (RenderObject::createInlineBox):
        (RenderObject::style):
        (RenderObject::getPseudoStyle):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        (pseudoBit):
        (RenderStyle::hasPseudoStyle):
        (RenderStyle::setHasPseudoStyle):
        (RenderStyle::getPseudoStyle):
        (RenderStyle::addPseudoStyle):
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::NonInheritedFlags::operator==):
        (khtml::RenderStyle::setBitDefaults):
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::paintSelection):
        (RenderText::paintObject):
        (RenderText::htmlFont):

2003-10-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	More exception blocking.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::~KWQKHTMLPart):
        (KWQKHTMLPart::generateFrameName):
        (KWQKHTMLPart::openURL):
        (KWQKHTMLPart::openURLRequest):
        (regExpForLabels):
        (KWQKHTMLPart::clearRecordedFormValues):
        (KWQKHTMLPart::recordFormValue):
        (KWQKHTMLPart::submitForm):
        (KHTMLPart::frameDetached):
        (KWQKHTMLPart::urlSelected):
        (KWQKHTMLPart::createPart):
        (KWQKHTMLPart::setTitle):
        (KWQKHTMLPart::setStatusBarText):
        (KWQKHTMLPart::scheduleClose):
        (KWQKHTMLPart::unfocusWindow):
        (KWQKHTMLPart::jumpToSelection):
        (KWQKHTMLPart::redirectionTimerStartedOrStopped):
        (KWQKHTMLPart::userAgent):
        (KWQKHTMLPart::mimeTypeForFileName):
        (KWQKHTMLPart::nextKeyView):
        (KWQKHTMLPart::currentEventIsMouseDownInWidget):
        (KWQKHTMLPart::openURLFromPageCache):
        (KWQKHTMLPart::saveDocumentState):
        (KWQKHTMLPart::restoreDocumentState):
        (KWQKHTMLPart::requestedURLString):
        (KWQKHTMLPart::incomingReferrer):
        (KWQKHTMLPart::runJavaScriptAlert):
        (KWQKHTMLPart::runJavaScriptConfirm):
        (KWQKHTMLPart::runJavaScriptPrompt):
        (KWQKHTMLPart::createEmptyDocument):
        (KWQKHTMLPart::keyEvent):
        (KWQKHTMLPart::khtmlMousePressEvent):
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
        (KWQKHTMLPart::lastEventIsMouseUp):
        (findViewInSubviews):
        (KWQKHTMLPart::khtmlMouseMoveEvent):
        (KWQKHTMLPart::passSubframeEventToSubframe):
        (KWQKHTMLPart::buttonForCurrentEvent):
        (KWQKHTMLPart::stateForCurrentEvent):
        (KWQKHTMLPart::mouseDown):
        (KWQKHTMLPart::mouseDragged):
        (KWQKHTMLPart::mouseUp):
        (KWQKHTMLPart::sendFakeEventsAfterWidgetTracking):
        (KWQKHTMLPart::mouseMoved):
        (KWQKHTMLPart::sendContextMenuEvent):
        (fileWrapperForElement):
        (KWQKHTMLPart::attributedString):
        (KWQKHTMLPart::keyboardUIMode):

2003-10-21  Chris Blumenberg  <cblu@apple.com>

	Fixed: <rdar://problem/3176170>: OBJECT tag with no or empty TYPE is mishandled

        Reviewed by rjw.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::createPart): call renamed frameRequiredForMIMEType:URL:
        * kwq/WebCoreBridge.h: renamed frameRequiredForMIMEType: to frameRequiredForMIMEType:URL:

2003-10-20  David Hyatt  <hyatt@apple.com>

	Fix generated content (before/after) so that it no longer has any restrictions on it.   CSS2.1 lifted 
	restrictions preventing the floating/positioning of generated content.
	
        Reviewed by rjw

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::adjustRenderStyle):
        * khtml/rendering/render_container.cpp:
        (RenderContainer::updatePseudoChild):

2003-10-20  Ken Kocienda  <kocienda@apple.com>

        Reviewed by David

        * khtml/dom/dom2_events.cpp:
        (UIEvent::keyCode): Change over to use ascii value for key code.
        (UIEvent::which): Ditto.
        (KeyboardEvent::KeyboardEvent): New key event class which
	tracks the DOM Level 3 spec more closely.
        (KeyboardEvent::operator = ): New function.
        (KeyboardEvent::~KeyboardEvent): New function.
        (KeyboardEvent::ctrlKey): New function.
        (KeyboardEvent::shiftKey): New function.
        (KeyboardEvent::altKey): New function.
        (KeyboardEvent::metaKey): New function.
        (KeyboardEvent::altGraphKey): New function.
        (KeyboardEvent::initKeyboardEvent): New function.
        * khtml/dom/dom2_events.h: Ditto.
        * khtml/html/html_formimpl.cpp:
        (HTMLGenericFormElementImpl::defaultEventHandler): Use key 
	identifiers to test which key was pressed, instead of removed keyVal().
        (HTMLInputElementImpl::defaultEventHandler): Ditto.
        (HTMLSelectElementImpl::defaultEventHandler): Ditto.
        * khtml/html/html_inlineimpl.cpp:
        (HTMLAnchorElementImpl::defaultEventHandler): Change casts to match new
	class name. Use key identifiers to test which key was pressed, 
	instead of removed keyVal(). Use new modifier accessors.
        * khtml/xml/dom2_eventsimpl.cpp:
        (EventImpl::typeToId): Some reorganization of the constants in the
	switch statements. Name change for these to remove the KHTML_ prefix
	from the key up and key down events will happen soon.
        (EventImpl::idToType): Ditto.
        (KeyboardEventImpl::KeyboardEventImpl): New key event class which
        tracks the DOM Level 3 spec more closely.
        (KeyboardEventImpl::~KeyboardEventImpl): Ditto.
        (KeyboardEventImpl::initKeyboardEvent): Ditto.
        * khtml/xml/dom2_eventsimpl.h:
        (DOM::EventImpl::): Some reorganization of the constants in the
        switch statements. Name change for these to remove the KHTML_ prefix
        from the key up and key down events will happen soon.
        (DOM::KeyboardEventImpl::keyIdentifier): New function.
        (DOM::KeyboardEventImpl::keyLocation): New function.
        (DOM::KeyboardEventImpl::ctrlKey): New function.
        (DOM::KeyboardEventImpl::shiftKey): New function.
        (DOM::KeyboardEventImpl::altKey): New function.
        (DOM::KeyboardEventImpl::metaKey): New function.
        (DOM::KeyboardEventImpl::altGraphKey): New function.
        (DOM::KeyboardEventImpl::qKeyEvent): New function.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createEvent): Now can create keyboard events.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::dispatchKeyEvent): Class name changes.
        * kwq/KWQEvent.h: Added QString identifier member.
        * kwq/KWQEvent.mm:
        (hexDigit): Added helper.
        (identifierForKeyText): Added new function to map keys to DOM
	key identifiers as listed in the DOM spec.
        (QKeyEvent::identifier): Added accessor.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::stateForCurrentEvent): Added check to see if
	a key press is on one of the numeric keypad keys.
        * kwq/KWQLogging.h: Added log constant for DOM events.
        * kwq/KWQLogging.m: Ditto

2003-10-20  David Hyatt  <hyatt@apple.com>

	Make first-letter and before/after work with text transforms.
	
        Reviewed by mjs

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::addChildToFlow):
        * khtml/rendering/render_container.cpp:
        (RenderContainer::updatePseudoChild):
        * khtml/rendering/render_text.cpp:
        (RenderText::setStyle):
        (RenderText::isTextFragment):
        (RenderText::originalString):
        (RenderText::setText):
        (m_generatedContentStr):
        (m_start):
        (RenderTextFragment::~RenderTextFragment):
        (RenderTextFragment::isTextFragment):
        (RenderTextFragment::originalString):
        * khtml/rendering/render_text.h:
        (khtml::RenderTextFragment::start):
        (khtml::RenderTextFragment::end):
        (khtml::RenderTextFragment::contentString):
        * khtml/xml/dom_nodeimpl.h:
        (DOM::NodeImpl::setRenderer):

2003-10-19  David Hyatt  <hyatt@apple.com>

	Remove the "flow-around-floats" hack for lists.  Other browsers don't do this.
	
        Reviewed by darin

        * khtml/css/quirks.css:

2003-10-19  David Hyatt  <hyatt@apple.com>

	Fix for a regression/crash on tivocommunity.com caused by faulty border-collapse code in the collapsedRightBorder
	case.  I forgot to deal with colspans.
	
        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTable::cellRight):
        (RenderTableCell::collapsedRightBorder):

2003-10-19  David Hyatt  <hyatt@apple.com>

	Patch from KHTML trunk that makes textareas work properly even when they have no render objects.

        * khtml/html/html_formimpl.cpp:
        (HTMLTextAreaElementImpl::encoding):
        (HTMLTextAreaElementImpl::value):

2003-10-18  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3454444 -- contents of mailto form shows up in Mail title instead of body (IE sends mail directly)

        * kwq/KWQKURL.mm: (KURL::parse): Changed non-hierarchical code to consider everything
        after a question mark as a query, just the way the hierarchical code does. This makes
        the code that constructs the mailto URL work properly.

2003-10-18  David Hyatt  <hyatt@apple.com>

	Fix the intrinsic minmax width computation for blocks and XUL boxes to actually check fixed min/max CSS widths.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::calcMinMaxWidth):
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::calcMinMaxWidth):

2003-10-18  David Hyatt  <hyatt@apple.com>

	Change the names of the border-spacing properties to border-horizontal-spacing and border-vertical-spacing.
	
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssproperties.c:
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyRule):

2003-10-18  David Hyatt  <hyatt@apple.com>

	Fix for diveintomark className parsing bug.  class="bigblue blue" would fail to match a rule with .blue.
	The bug was in the selector matching code for class attributes.

	Also fixing a minmax width bug for blocks on the mozilla.org Web site.  XUL boxes had the same bug as
	well.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::checkOneSelector):
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::calcMinMaxWidth):
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::calcMinMaxWidth):

2003-10-18  David Hyatt  <hyatt@apple.com>

	Fix for 3443502, generated content sometimes doesn't generate.  The bug is caused by an
	uninitialized variable.  m_isContinuation needed to be set to false in the RenderInline
	constructor.
	
        * khtml/rendering/render_inline.cpp:
        (m_isContinuation):

2003-10-17  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - make text areas set the base writing direction based on the direction in the CSS style

        * kwq/KWQTextArea.h: Added setBaseWritingDirection method.
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _createTextView]): Use _KWQ_setTypingParagraphStyle.
        (-[KWQTextArea setWordWrap:]): Use _KWQ_setTypingParagraphStyle.
        (-[KWQTextArea setBaseWritingDirection:]): Added. New method that sets the base writing
        direction in both the style of the text and the typing attributes.
        (-[NSTextView _KWQ_typingParagraphStyle]): Added. Helper method to make setBaseWritingDirection:
        a little less gigantic.
        (-[NSTextView _KWQ_setTypingParagraphStyle:]): Ditto.
        (-[NSTextStorage _KWQ_setBaseWritingDirection:]): Ditto.

        * kwq/KWQTextEdit.mm: (QTextEdit::setAlignment): Set both alignment and base writing direction.

2003-10-17  David Hyatt  <hyatt@apple.com>

	Implement horizontal and vertical border-spacing.  Allow them to be specified individually.

        Reviewed by mjs

	------

	Fix the calcWidth method of tables to account for horizontal margins properly.

	Reviewed by john

	------

	Implement border collapsing in tables.

	Reviewed by kocienda

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyRule):
        * khtml/css/cssvalues.c:
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren):
        * khtml/rendering/render_box.cpp:
        (RenderBox::paintBoxDecorations):
        * khtml/rendering/render_form.cpp:
        (RenderFieldset::paintBorderMinusLegend):
        * khtml/rendering/render_object.cpp:
        (RenderObject::paintBorder):
        (RenderObject::collectBorders):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        (StyleInheritedData::StyleInheritedData):
        (StyleInheritedData::operator==):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        (khtml::):
        (khtml::CollapsedBorderValue::precedence):
        (khtml::CollapsedBorderValue::width):
        (khtml::CollapsedBorderValue::style):
        (khtml::CollapsedBorderValue::exists):
        (khtml::CollapsedBorderValue::color):
        (khtml::CollapsedBorderValue::isTransparent):
        (khtml::CollapsedBorderValue::operator==):
        (khtml::RenderStyle::borderLeft):
        (khtml::RenderStyle::borderRight):
        (khtml::RenderStyle::borderTop):
        (khtml::RenderStyle::borderBottom):
        (khtml::RenderStyle::horizontalBorderSpacing):
        (khtml::RenderStyle::verticalBorderSpacing):
        (khtml::RenderStyle::setHorizontalBorderSpacing):
        (khtml::RenderStyle::setVerticalBorderSpacing):
        * khtml/rendering/render_table.cpp:
        (RenderTable::RenderTable):
        (RenderTable::setStyle):
        (RenderTable::calcWidth):
        (RenderTable::paint):
        (RenderTable::borderLeft):
        (RenderTable::borderRight):
        (RenderTable::borderTop):
        (RenderTable::borderBottom):
        (RenderTable::cellAbove):
        (RenderTable::cellBelow):
        (RenderTable::cellLeft):
        (RenderTable::cellRight):
        (RenderTableSection::setCellWidths):
        (RenderTableSection::calcRowHeight):
        (RenderTableSection::layoutRows):
        (compareBorders):
        (RenderTableCell::collapsedLeftBorder):
        (RenderTableCell::collapsedRightBorder):
        (RenderTableCell::collapsedTopBorder):
        (RenderTableCell::collapsedBottomBorder):
        (RenderTableCell::borderLeft):
        (RenderTableCell::borderRight):
        (RenderTableCell::borderTop):
        (RenderTableCell::borderBottom):
        (collapsedBorderStyle):
        (CollapsedBorder::CollapsedBorder):
        (CollapsedBorders:::count):
        (CollapsedBorders::addBorder):
        (CollapsedBorders::nextBorder):
        (addBorderStyle):
        (RenderTableCell::collectBorders):
        (RenderTableCell::paintCollapsedBorder):
        (RenderTableCell::paintObject):
        (RenderTableCell::paintBoxDecorations):
        * khtml/rendering/render_table.h:
        (khtml::RenderTable::hBorderSpacing):
        (khtml::RenderTable::vBorderSpacing):
        (khtml::RenderTable::bordersPaddingAndSpacing):
        (khtml::RenderTable::currentBorderStyle):
        * khtml/rendering/table_layout.cpp:
        (FixedTableLayout::layout):
        (AutoTableLayout::calcEffectiveWidth):
        (AutoTableLayout::layout):

2003-10-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	More exception blocking.
	
        * kwq/KWQFont.mm:
        (QFont::isFixedPitch):
        (QFont::getNSFont):
        * kwq/KWQKJobClasses.mm:
        (KIO::TransferJob::~TransferJob):
        * kwq/KWQLoader.mm:
        (KWQServeRequest):
        (KWQCheckIfReloading):
        (KWQCheckCacheObjectStatus):
        (KWQRetainResponse):
        (KWQReleaseResponse):
        (KWQResponseMIMEType):

=== Safari-110 ===

2003-10-16  Darin Adler <darin@apple.com>

        Reviewed by vicki. 

	- fix buildit build failure 

        * kwq/KWQScrollView.mm: 
        (QScrollView::resizeContents):


2003-10-15  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - change "volatile X * volatile" to "X * volatile" in cases where the
          pointer needs to be volatile but the object pointed to do does not

        * kwq/KWQKConfigBase.mm: (KConfig::readEntry):
        * kwq/KWQKCursor.mm: (+[NSCursor _WebCore_cursorWithName:hotSpot:]):
        * kwq/KWQKLocale.mm:
        (inputElementAltText):
        (resetButtonDefaultLabel):
        (searchableIndexIntroduction):
        (submitButtonDefaultLabel):
        (KLocale::language):
        * kwq/KWQLineEdit.mm: (QLineEdit::text):
        * kwq/KWQScrollView.mm:
        (QScrollView::setContentsPos):
        (QScrollView::addChild):
        (QScrollView::updateContents):
        (QScrollView::contentsToViewport):
        (QScrollView::viewportToContents):
        (QScrollView::getDocumentView):
        * kwq/KWQTextEdit.mm:
        (QTextEdit::text):
        (QTextEdit::textWithHardLineBreaks):
        * kwq/KWQWidget.mm: (QWidget::getOuterView):
        Removed the excess volatiles and excess casts that go with them.

        * kwq/KWQKCookieJar.mm: (KWQKCookieJar::cookie): Do the same, but also
        remove an unnecessary nil check that is the same as QString::fromNSString's
        default behavior.

2003-10-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	More objc-exception-blocking excitement.

        * kwq/KWQKConfigBase.mm:
        (KConfig::readEntry):
        (KConfig::readNumEntry):
        (RefreshPlugins):
        * kwq/KWQKCursor.mm:
        (+[NSCursor _WebCore_cursorWithName:hotSpot:]):
        * kwq/KWQKJavaAppletWidget.mm:
        (KJavaAppletWidget::showApplet):
        * kwq/KWQKLocale.mm:
        (inputElementAltText):
        (resetButtonDefaultLabel):
        (searchableIndexIntroduction):
        (submitButtonDefaultLabel):
        (KLocale::language):
        * kwq/KWQRegion.mm:
        (QRegion::QRegion):

2003-10-14  David Hyatt  <hyatt@apple.com>

	Fix an obvious little typo with smallCaps inheritance.  Richard reviewed.

	Also merge in Dirk's patch to fix a crasher caused by an obvious deref mistake.
	
        Reviewed by rjw and nobody

        * khtml/css/cssstyleselector.cpp:
        (khtml::convertToLength):
        (khtml::CSSStyleSelector::applyRule):

2003-10-14  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Hyatt

        * khtml/dom/dom_misc.h: Declared TristateFlag enum used to implement
	inheritance behavior for inheritable attributes like designMode.
        * khtml/dom/html_document.cpp:
        (HTMLDocument::designMode): Added getter.
        (HTMLDocument::setDesignMode): Added setter.
        * khtml/dom/html_document.h: Added declarations for designMode getter and setter.
        * khtml/dom/html_element.cpp:
        (HTMLElement::isContentEditable): Added convenience.
        (HTMLElement::contentEditable): Added getter.
        (HTMLElement::setContentEditable): Added setter.
        * khtml/dom/html_element.h: Added declarations for contentEditable accessors.
        * khtml/ecma/kjs_html.cpp: Added js support for contentEditable and designMode.
        (KJS::HTMLDocument::tryGet)
        (KJS::HTMLDocument::putValue)
        (KJS::HTMLElement::getValueProperty)
        (KJS::HTMLElement::putValue)
        * khtml/ecma/kjs_html.h:
        (KJS::HTMLDocument::): Added DesignMode to attribuute enum.
        (KJS::HTMLElement::): Added ContentEditable to attribute enum.
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::designMode): Added getter.
        (HTMLDocumentImpl::setDesignMode): Added setter.
        * khtml/html/html_documentimpl.h: Declared designMode accessors.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::HTMLElementImpl):
        (HTMLElementImpl::parseAttribute): Added support for contentEditable.
        (HTMLElementImpl::isContentEditable): Added. Implements inheritance feature
	for this attribute.
        (HTMLElementImpl::contentEditable): Getter for contentEditable attribute.
        (HTMLElementImpl::setContentEditable): Setter for contentEditable attribute.
        * khtml/html/html_elementimpl.h:
        * khtml/khtml_part.cpp:
        (KHTMLPart::setEditMode): Added.
        (KHTMLPart::editMode): Added. Implements inheritance behavior for
	attribute.
        (KHTMLPart::inEditMode): Helper that calls on editMode function.
        (KHTMLPart::parentPart): Made const.
        * khtml/khtml_part.h: Rolled in a couple of typo fixes. Added
	declarations for the changes made in the implementation file.
        * khtml/khtmlpart_p.h:
        (KHTMLPartPrivate::KHTMLPartPrivate): Declared editMode flag.
	Also added support for editMode flag in initializers and copy function.
        * khtml/misc/htmlattrs.in: Added contentEditable as an attribute name.

2003-10-13  David Hyatt  <hyatt@apple.com>

	Fix for a small-caps rendering error when used in conjunction with ::first-line.  Always update
	the Font variable even when QFonts are the same, since small-caps is not stored in QFonts.
	
        Reviewed by rjw

        * khtml/rendering/render_text.cpp:
        (RenderText::paintObject):

2003-10-13  Richard Williamson (Home0  <rjw@apple.com>

	Updated layout tests actuals to reflect implementation of small-caps style.

        * layout-tests/css1/font_properties/font-expected.txt:
        * layout-tests/css1/font_properties/font_variant-expected.txt:
        * layout-tests/css1/pseudo/firstline-expected.txt:
        * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:

2003-10-13  Richard Williamson <rjw@apple.com>

	Added support for small-caps.

        Reviewed by John.

        * khtml/rendering/font.h:
        (khtml::Font::isSmallCaps):
        * khtml/rendering/render_text.cpp:
        (RenderText::shouldUseMonospaceCache):

2003-10-12  Darin Adler  <darin@apple.com>

        * layout-tests/fast/js/date-parse-test.html: Fixed a couple of silly mistakes.

        * kwq/character-sets.txt: New version of file from www.iana.org. No substantive change.
        Also, now that we don't use MIB numbers any more, I could leave out our one local change,
        the MIB number we added for ISO-10646-J-1.

2003-10-10  David Hyatt  <hyatt@apple.com>

	Beginning of work on border collapsing.  This patch makes sure that cell spacing between cells is
	ignored and that padding on tables is ignored.  This ensures that there is no space between cells
	or between the edges of cells and the border of the table itself.  

        Reviewed by john

        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::setBitDefaults):
        * khtml/rendering/render_table.cpp:
        (RenderTable::setStyle):
        (RenderTable::layout):
        * khtml/rendering/render_table.h:
        (khtml::RenderTable::collapseBorders):
        (khtml::RenderTable::bordersPaddingAndSpacing):

2003-10-10  David Hyatt  <hyatt@apple.com>

	Fix for table regression 3449444, as well as a patch to support padding on tables and to stop
	honoring borders on row groups (both of which are correct for the "separate" border model).
	
	* khtml/rendering/render_table.cpp:
        (RenderTable::layout):
        (RenderTableSection::calcRowHeight):
        (RenderTableSection::layoutRows):
        * khtml/rendering/render_table.h:
        (khtml::RenderTable::bordersPaddingAndSpacing):
        * khtml/rendering/table_layout.cpp:
        (FixedTableLayout::calcMinMaxWidth):
        (FixedTableLayout::layout):
        (AutoTableLayout::calcMinMaxWidth):
        (AutoTableLayout::layout):

	Reviewed by darin

2003-10-10  David Hyatt  <hyatt@apple.com>
	
	Patch to move the widgets during layout instead of at paint time.
	
        Reviewed by darin

        * khtml/khtmlview.cpp:
        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::repaintViewRectangle):
        * khtml/rendering/render_form.cpp:
        (RenderFormElement::baselinePosition):
        (RenderFormElement::layout):
        * khtml/rendering/render_object.cpp:
        (RenderObject::updateWidgetPositions):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::layout):
        (RenderWidget::updateWidgetPositions):
        * khtml/rendering/render_replaced.h:
        * kwq/KWQCheckBox.h:
        * kwq/KWQCheckBox.mm:
        (QCheckBox::baselinePosition):
        * kwq/KWQComboBox.h:
        * kwq/KWQComboBox.mm:
        (QComboBox::baselinePosition):
        * kwq/KWQFileButton.h:
        * kwq/KWQFileButton.mm:
        (KWQFileButton::baselinePosition):
        * kwq/KWQLineEdit.h:
        * kwq/KWQLineEdit.mm:
        (QLineEdit::baselinePosition):
        * kwq/KWQPushButton.h:
        * kwq/KWQPushButton.mm:
        (QPushButton::baselinePosition):
        * kwq/KWQRadioButton.h:
        * kwq/KWQRadioButton.mm:
        (QRadioButton::baselinePosition):
        * kwq/KWQWidget.h:
        * kwq/KWQWidget.mm:
        (QWidget::baselinePosition):
        (QWidget::setFrameGeometry):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:

2003-10-10  David Hyatt  <hyatt@apple.com>

	Make sure the i-beam cursor is only forced if you have a selection.

	Reviewed by John

	* khtml/khtmlview.cpp
	
2003-10-10  Ken Kocienda  <kocienda@apple.com>

        Reviewed by John

	Fix for this bug:

	<rdar://problem/3440703>: Textarea form controls do not respect disabled attribute

        * khtml/rendering/render_form.cpp:
        (RenderTextArea::updateFromElement): Check for disabled attribute.
        * kwq/KWQTextArea.h:
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea setEnabled:]): Added. 
        (-[KWQTextArea isEnabled]): Added.
        (-[KWQTextArea drawRect:]): Draws a disabled-looking  bezel when disabled.
        (-[KWQTextAreaTextView becomeFirstResponder]): Return NO if disabled.
        (-[KWQTextAreaTextView mouseDown:]): Block events if disabled.
        (-[KWQTextAreaTextView keyDown:]): Ditto.
        (-[KWQTextAreaTextView keyUp:]): Ditto.
        (-[KWQTextAreaTextView setEnabled:]): Added. Pass value through to editable
	attribute on text view.
        (-[KWQTextAreaTextView isEnabled]): Added.
        (-[KWQTextAreaTextView drawRect:]): Set the text color to a disabled color
	when disabled.
        * kwq/KWQTextEdit.h:
        * kwq/KWQTextEdit.mm:
        (QTextEdit::isDisabled): Added.
        (QTextEdit::setDisabled): Added.

2003-10-10  Maciej Stachowiak  <mjs@apple.com>

	- fixed 3449405 - REGRESSION: reproducible crash changing focus w/ button on page, e.g. on www.aa.com
	
	More fallout from the exception blocking.

        * kwq/KWQButton.mm:
        (QButton::focusPolicy): Don't return from exception block (caught
	by Darin).

2003-10-09  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3449280 -- REGRESSION: crash copying a selection that ends in a <br>

        * khtml/rendering/render_br.h: Add checkSelectionPointIgnoringContinuations.
        * khtml/rendering/render_br.cpp: (RenderBR::checkSelectionPointIgnoringContinuations):
        Override to never return an offset of 1. We can't use a character offset because the
        DOM doesn't know that we're implemented as a text object. So an offset of 1 turns into
        "after this element".

2003-10-09  Maciej Stachowiak  <mjs@apple.com>

        - fixed crash I just added.

        * kwq/KWQWidget.mm:
        (QWidget::setCursor): Move BLOCK_NS_EXCEPTIONS macros so
	you don't `break' out of the blocking code.

2003-10-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	More Cocoa exception blocking work.

        * kwq/KWQFrame.mm:
        (QFrame::setFrameStyle):
        * kwq/KWQLineEdit.mm:
        (QLineEdit::QLineEdit):
        (QLineEdit::~QLineEdit):
        (QLineEdit::setEchoMode):
        (QLineEdit::setFont):
        (QLineEdit::setText):
        (QLineEdit::text):
        (QLineEdit::isReadOnly):
        (QLineEdit::setReadOnly):
        (QLineEdit::maxLength):
        (QLineEdit::selectAll):
        (QLineEdit::edited):
        (QLineEdit::setEdited):
        (QLineEdit::sizeForCharacterWidth):
        (QLineEdit::baselinePosition):
        (QLineEdit::setAlignment):
        * kwq/KWQListBox.mm:
        (QListBox::QListBox):
        (QListBox::~QListBox):
        (QListBox::count):
        (QListBox::clear):
        (QListBox::setSelectionMode):
        (QListBox::insertItem):
        (QListBox::insertGroupLabel):
        (QListBox::endBatchInsert):
        (QListBox::setSelected):
        (QListBox::isSelected):
        (QListBox::setEnabled):
        (QListBox::sizeForNumberOfLines):
        (QListBox::focusPolicy):
        * kwq/KWQPushButton.mm:
        (QPushButton::QPushButton):
        (QPushButton::sizeHint):
        (QPushButton::baselinePosition):
        (QPushButton::dimensions):
        * kwq/KWQRadioButton.mm:
        (QRadioButton::QRadioButton):
        (QRadioButton::setChecked):
        (QRadioButton::isChecked):
        (QRadioButton::dimensions):
        * kwq/KWQScrollBar.mm:
        (-[KWQScrollBar initWithQScrollBar:]):
        (:m_valueChanged):
        (QScrollBar::~QScrollBar):
        (QScrollBar::setValue):
        (QScrollBar::setKnobProportion):
        (QScrollBar::scrollbarHit):
        * kwq/KWQScrollView.mm:
        (QScrollView::visibleWidth):
        (QScrollView::visibleHeight):
        (QScrollView::contentsWidth):
        (QScrollView::contentsHeight):
        (QScrollView::contentsX):
        (QScrollView::contentsY):
        (QScrollView::setContentsPos):
        (QScrollView::setVScrollBarMode):
        (QScrollView::setHScrollBarMode):
        (QScrollView::setScrollBarsMode):
        (QScrollView::vScrollBarMode):
        (QScrollView::hScrollBarMode):
        (QScrollView::hasVerticalScrollBar):
        (QScrollView::hasHorizontalScrollBar):
        (QScrollView::suppressScrollBars):
        (QScrollView::addChild):
        (QScrollView::removeChild):
        (QScrollView::resizeContents):
        (QScrollView::updateContents):
        (QScrollView::contentsToViewport):
        (QScrollView::viewportToContents):
        (QScrollView::setStaticBackground):
        (QScrollView::ensureVisible):
        (QScrollView::getDocumentView):
        * kwq/KWQTextEdit.mm:
        (QTextEdit::QTextEdit):
        (QTextEdit::setText):
        (QTextEdit::text):
        (QTextEdit::textWithHardLineBreaks):
        (QTextEdit::getCursorPosition):
        (QTextEdit::setCursorPosition):
        (QTextEdit::wordWrap):
        (QTextEdit::setWordWrap):
        (QTextEdit::isReadOnly):
        (QTextEdit::setReadOnly):
        (QTextEdit::selectAll):
        (QTextEdit::setFont):
        (QTextEdit::setAlignment):
        (QTextEdit::sizeWithColumnsAndRows):
        * kwq/KWQWidget.mm:
        (QWidget::QWidget):
        (QWidget::~QWidget):
        (QWidget::setActiveWindow):
        (QWidget::setEnabled):
        (QWidget::isEnabled):
        (QWidget::frameGeometry):
        (QWidget::hasFocus):
        (QWidget::setFocus):
        (QWidget::focusPolicy):
        (QWidget::isVisible):
        (QWidget::setCursor):
        (QWidget::cursor):
        (QWidget::setFrameGeometry):
        (QWidget::mapFromGlobal):
        (QWidget::setView):
        (QWidget::getOuterView):
        (QWidget::lockDrawingFocus):
        (QWidget::unlockDrawingFocus):
        (QWidget::disableFlushDrawing):
        (QWidget::enableFlushDrawing):
        (QWidget::setDrawingAlpha):
        (QWidget::paint):
        (QWidget::sendConsumedMouseUp):

2003-10-09  David Hyatt  <hyatt@apple.com>

	Stop printing extra spaces before list items.  Fixes ordered lists with list-style-position: inside.
	
        Reviewed by mjs

        * khtml/rendering/render_list.cpp:

2003-10-09  David Hyatt  <hyatt@apple.com>

	Make definition of kMin and kMax match the KHTML trunk.  Someone still needs to eliminate uses of QMIN
	and QMAX from the code.

        * kwq/KWQDef.h:
        (kMin):
        (kMax):

2003-10-09  Chris Blumenberg  <cblu@apple.com>

	Fixed: <rdar://problem/3333897>: should support navigator.plugins.refresh as a way to add a plugin without restarting Safari

        Reviewed by rjw.

        * khtml/ecma/kjs_navigator.cpp:
        (PluginBase::refresh): new
        (PluginsFunc::tryCall): call refresh
        * kwq/KWQKConfigBase.h:
        * kwq/KWQKConfigBase.mm:
        (RefreshPlugins): new
        * kwq/WebCoreViewFactory.h:

=== Safari-109 ===

2003-10-08  David Hyatt  <hyatt@apple.com>

	Fix for 3436723, the shrink-to-fit algorithm for positioned elements did not match
	the algorithm specified in section 10.3.7 of the CSS2.1 specification.  The min-width
	of the element was not being taken into account like it should have been.
	
        Reviewed by mjs

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcAbsoluteHorizontal):

2003-10-08  David Hyatt  <hyatt@apple.com>

	Implement min/max width and min/max height support for replaced elements.
	
        Reviewed by ken

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcReplacedWidth):
        (RenderBox::calcReplacedWidthUsing):
        (RenderBox::calcReplacedHeight):
        (RenderBox::calcReplacedHeightUsing):
        (RenderBox::availableHeight):
        (RenderBox::availableHeightUsing):
        * khtml/rendering/render_box.h:

2003-10-08  Maciej Stachowiak  <mjs@apple.com>

	Fix development build.
	
        * kwq/KWQExceptions.h: Correct assertion args.

2003-10-08  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	Start on blocking Cocoa exceptions when calling ObjC from C++ to
	avoid unreproducible crashes when this happens.

        * kwq/KWQExceptions.h: Added. Helper macros for exception blocking.
        * WebCore.pbproj/project.pbxproj: Add new header

	In all these files, block exceptions when calling ObjC from C++,
	or explain why not.
	
        * kwq/KWQAccObjectCache.mm:
        * kwq/KWQApplication.mm:
        * kwq/KWQButton.mm:
        (QButton::QButton):
        (QButton::~QButton):
        (QButton::setText):
        (QButton::text):
        (QButton::clicked):
        (QButton::simulateClick):
        (QButton::setFont):
        (QButton::focusPolicy):
        * kwq/KWQCheckBox.mm:
        (QCheckBox::QCheckBox):
        (QCheckBox::setChecked):
        (QCheckBox::isChecked):
        (QCheckBox::dimensions):
        * kwq/KWQColor.mm:
        * kwq/KWQComboBox.mm:
        (QComboBox::QComboBox):
        (QComboBox::~QComboBox):
        (QComboBox::insertItem):
        (QComboBox::sizeHint):
        (QComboBox::setCurrentItem):
        (QComboBox::updateCurrentItem):
        (QComboBox::setFont):
        (QComboBox::dimensions):
        * kwq/KWQCursor.mm:
        * kwq/KWQFile.mm:
        * kwq/KWQFileButton.mm:
        (KWQFileButton::KWQFileButton):
        (KWQFileButton::~KWQFileButton):
        (KWQFileButton::setFilename):
        (KWQFileButton::sizeForCharacterWidth):
        (KWQFileButton::frameGeometry):
        (KWQFileButton::setFrameGeometry):
        (KWQFileButton::baselinePosition):
        (KWQFileButton::filenameChanged):
        * kwq/KWQKCookieJar.mm:
        (KWQKCookieJar::cookie):
        (KWQKCookieJar::setCookie):
        (KWQKCookieJar::cookieEnabled):
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow):
        (KHTMLPartBrowserExtension::setIconURL):
        (KHTMLPartBrowserExtension::setTypedIconURL):
        * kwq/KWQKHistoryProvider.mm:
        (KParts::HistoryProvider::contains):
        * kwq/KWQKPartsBrowserInterface.mm:
        (KParts::BrowserInterface::callMethod):
        * kwq/KWQKStandardDirs.mm:
        * kwq/KWQKURL.mm:
        * kwq/KWQKWinModule.mm:
        (KWinModule::workArea):
        * kwq/KWQObject.mm:
        * kwq/KWQString.mm:
        (QString::getNSString):
        * kwq/KWQTimer.mm:
        * kwq/KWQWindowWidget.mm:

2003-10-07  David Hyatt  <hyatt@apple.com>

	Fix for link dragging regression in the titles of links.  More accessibility 
	improvements.
	
        Reviewed by darin

        * khtml/khtml_part.cpp:
        (KHTMLPart::text):
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject role]):
        (-[KWQAccObject roleDescription]):
        (-[KWQAccObject helpText]):
        (-[KWQAccObject textUnderElement]):
        (-[KWQAccObject value]):
        (-[KWQAccObject title]):
        (-[KWQAccObject accessibilityIsIgnored]):
        (-[KWQAccObject accessibilityAttributeValue:]):
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementAtPoint:]):

2003-10-07  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

	Fix for these bugs:

	<rdar://problem/3443296>: REGRESSION: pop-up menu gets focus, but once it has 	
	focus doesn't work right
	<rdar://problem/3444873>: Select widgets that use list views do not take part in tab order
	<rdar://problem/3446306>: Text area form widgets do not accept DOM focus correctly
	<rdar://problem/3446323>: Using keyboard to work popup button select form 
	widget causes a crash

	The intention of this patch is to add keyboard navigation support for
	HTML form select widgets. This includes the two visual representations
	for these widgets: popup buttons and lists. Many keyboard, focus, and
	tabbing fixes are included in this work, as indicated below.

        * khtml/html/html_formimpl.cpp:
        (HTMLSelectElementImpl::defaultEventHandler): Added. Submit form when
	return or enter key is pressed when focused on a select widget.
        * khtml/html/html_formimpl.h: Make HTMLSelectElementImpl a friend class
	of HTMLInputElementImpl. This is done so that an HTMLSelectElementImpl
	can call the private method which simulates a form submit.
	Also add declaration of defaultEventHandler function.
        * kwq/KWQButton.h: Clean up focusPolicy declaration.
        * kwq/KWQComboBox.h: Add focusPolicy declaration.
        * kwq/KWQComboBox.mm:
        (QComboBox::focusPolicy): Added. Widget will focus if full keyboard
	access is on.
        (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]): Now
	calls sendFakeEventsAfterWidgetTracking instead of 
	doFakeMouseUpAfterWidgetTracking now that name has changed.
        (-[KWQPopUpButton becomeFirstResponder]): Added. Needed for setting
	focus correctly.
        (-[KWQPopUpButton resignFirstResponder]): Ditto.
        (-[KWQPopUpButton nextKeyView]): Added. Makes tabbing work correctly
	for this widget.
        (-[KWQPopUpButton previousKeyView]): Ditto.
        (-[KWQPopUpButton nextValidKeyView]): Ditto.
        (-[KWQPopUpButton previousValidKeyView]): Ditto.
        * kwq/KWQKHTMLPart.h: Change name of doFakeMouseUpAfterWidgetTracking
	to sendFakeEventsAfterWidgetTracking now that it handles key events
	as well.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::sendFakeEventsAfterWidgetTracking): Name change as
	noted above. Also handles sending simulated key up events.
        * kwq/KWQLineEdit.h:
        (QLineEdit::checksDescendantsForFocus): Added. This is a big
	part of the fiz for <rdar://problem/3446306>.
        * kwq/KWQListBox.h:
        (QListBox::checksDescendantsForFocus): Ditto. Yes for this widget.
        * kwq/KWQListBox.mm:
        (QListBox::focusPolicy): Added. Widget will focus if full keyboard
        access is on.
        (-[KWQListBoxScrollView becomeFirstResponder]): Added. Needed for setting
        focus correctly. This sets the focus to its document view.
        (-[KWQTableView becomeFirstResponder]): Added. Needed for setting
        focus correctly.
        (-[KWQTableView resignFirstResponder]): Added. Needed for setting
        focus correctly.
        (-[KWQTableView nextKeyView]): Added. Makes tabbing work correctly
        for this widget.
        (-[KWQTableView previousKeyView]): Ditto.
        (-[KWQTableView nextValidKeyView]): Ditto.
        (-[KWQTableView previousValidKeyView]): Ditto.
        (-[KWQTableView _KWQ_setKeyboardFocusRingNeedsDisplay]): Added.
        * kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView becomeFirstResponder]): Other part of fix for
	<rdar://problem/3446306>. The recursion guards were bad and wrong.
	The checksDescendantsForFocus improvement prevents the erroneous
	recursion from happening.
        * kwq/KWQTextEdit.h:
        (QTextEdit::checksDescendantsForFocus): Added. Yes for this widget.
        * kwq/KWQWidget.h:
        (QWidget::checksDescendantsForFocus): Added. No by default.
        * kwq/KWQWidget.mm:
        (QWidget::hasFocus): Now uses checksDescendantsForFocus to perform
	proper checks for views that may have a subview which is first
	responder.

2003-10-07  David Hyatt  <hyatt@apple.com>

	Fix for 3363421, event handlers could be triggered for content outside an overflow:hidden
	area.  The layer checks that test for intersection/point containment need to only include
	layers with overhanging floats if the element is overflow:visible.

	Fix for 3366801, assignment to scrollLeft/Top of an overflow:hidden layer makes the layer
	disappear.  overflow:hidden blocks actually were never computing their scroll dimensions,
	and so had bogus answers for those values.

	Fix for 3366686, no reliable scrollHeight/Width reporting for overflow:hidden or
	overflow:visible elements.  The former was caused by the same bug as 3366801.  The
	latter was just me using the wrong method (clientWidth/Height instead of
	overflowWidth/Height).

	This patch also tightens the assignment to scrollLeft/Top to not do anything if you don't 
	have an overflow value other than visible.
	
        Reviewed by darin

        * khtml/ecma/kjs_dom.cpp:
        (DOMNode::putValue):
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::layoutBlock):
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::layoutBlock):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::RenderLayer):
        (RenderLayer::scrollToOffset):
        (RenderLayer::scrollWidth):
        (RenderLayer::scrollHeight):
        (RenderLayer::computeScrollDimensions):
        (RenderLayer::updateScrollInfoAfterLayout):
        (RenderLayer::intersectsDamageRect):
        (RenderLayer::containsPoint):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::scrollWidth):
        (RenderObject::scrollHeight):
        * khtml/rendering/render_object.h:

2003-10-07  Darin Adler  <darin@apple.com>

        Reviewed by Chris.

        - fixed some exceptions I was seeing with my recent text change

        * khtml/khtml_part.cpp:
        (KHTMLPart::text): Return an empty string for a null range rather than raising an exception.
        (KHTMLPart::selection): Return a null range rather than raising an exception if there is
        no selection.

2003-10-07  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - removed code that mutates \n into a space so we can pass more W3C DOM Level 1 Core tests

        * khtml/rendering/bidi.cpp:
        (khtml::addRun): Treat \n as a space.
        (khtml::RenderBlock::computeHorizontalPositionsForLine): Treat \n as a space.
        (khtml::RenderBlock::findNextLineBreak): Treat \n outside <pre> as a space.
        Removed code that mutates the \n into a space.

        * khtml/rendering/render_text.cpp:
        (RenderText::trimmedMinMaxWidth): Treat \n outside <pre> as a space.
        (RenderText::calcMinMaxWidth): Treat \n outside <pre> as a space.
        Removed code that mutates the \n into a space.
        (RenderText::position): Detect a <br> with isBR instead of assuming a 1-character
        string with a \n in it is a <br>.

2003-10-06  David Hyatt  <hyatt@apple.com>

	Several fixes preparing for the incremental repainting patch to be enabled.

	(1) Make layers update their positions after layout instead of during layout or
	during painting.

	(2) Fix a regression from the overflow:hidden body quirk landing.  Make sure repaint()
	understands that quirk exists and avoids clipping when it shouldn't.

	(3) Fix a regression from the scrollbar improvements.  The vertical scrollbar repainted
	on every layout.

	(4) Make sure outside list bullets are repainted when a list item needs to repaint.
	
	(5) A whole bunch of INCREMENTAL_REPAINTING code that isn't turned on yet.
	
        Reviewed by kocienda

        * khtml/khtmlview.cpp:
        (KHTMLViewPrivate::KHTMLViewPrivate):
        (KHTMLViewPrivate::reset):
        (KHTMLView::resetScrollBars):
        (KHTMLView::needsFullRepaint):
        * khtml/khtmlview.h:
        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren):
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::layoutBlock):
        (khtml::RenderBlock::layoutBlockChildren):
        (khtml::RenderBlock::getAbsoluteRepaintRectIncludingFloats):
        (khtml::RenderBlock::repaintFloatingDescendants):
        (khtml::RenderBlock::repaintObjectsBeforeLayout):
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::computeAbsoluteRepaintRect):
        (RenderBox::repaintDuringLayoutIfMoved):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::layout):
        * khtml/rendering/render_canvas.h:
        (khtml::RenderCanvas::hasOverhangingFloats):
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::layoutBlock):
        (khtml::RenderFlexibleBox::layoutHorizontalBox):
        (khtml::RenderFlexibleBox::layoutVerticalBox):
        (khtml::RenderFlexibleBox::placeChild):
        * khtml/rendering/render_flexbox.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::getAbsoluteRepaintRect):
        * khtml/rendering/render_image.cpp:
        (RenderImage::setPixmap):
        (RenderImage::layout):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::RenderLayer):
        (RenderLayer::computeRepaintRects):
        (RenderLayer::updateLayerPositions):
        (RenderLayer::updateLayerPosition):
        (RenderLayer::checkScrollbarsAfterLayout):
        (RenderLayer::paintLayer):
        (RenderLayer::calculateClipRects):
        (RenderLayer::calculateRects):
        * khtml/rendering/render_layer.h:
        (khtml::RenderLayer::relativePositionOffset):
        * khtml/rendering/render_list.cpp:
        (RenderListItem::getAbsoluteRepaintRect):
        * khtml/rendering/render_list.h:
        (khtml::RenderListMarker::listImage):
        * khtml/rendering/render_object.cpp:
        (RenderObject::repaint):
        (RenderObject::repaintRectangle):
        (RenderObject::repaintAfterLayoutIfNeeded):
        (RenderObject::repaintDuringLayoutIfMoved):
        (RenderObject::repaintFloatingDescendants):
        (RenderObject::checkForRepaintDuringLayout):
        (RenderObject::repaintObjectsBeforeLayout):
        (RenderObject::getAbsoluteRepaintRectIncludingFloats):
        (RenderObject::container):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget):

2003-10-06  Darin Adler  <darin@apple.com>

        Reviewed by Ken.
        
        - preparation for the upcoming whitespace patch; refactored some of the code that extracts text

        * khtml/khtml_part.h: Added text() member function.
        * khtml/khtml_part.cpp:
        (KHTMLPart::text): Added. Refactored from selectedText; takes a DOM::Range as a parameter.
        Also added code to change newlines to spaces when extracting text from the DOM.
        (KHTMLPart::selectedText): Now calls text().
        (KHTMLPart::selection): Removed stray declaration.

        * kwq/KWQAccObject.mm: (-[KWQAccObject value]): Changed to call KHTMLPart::text.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Changed to call KHTMLPart::text
        instead of doing it ourselves.
        
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Added code to change change '\n'
        newlines to spaces when extracting text from the DOM.

2003-10-05  Maciej Stachowiak  <mjs@apple.com>

	Reviewed by Ken.

	- fixed 3444255 - REGRESSION: www.aa.com crashes (innerHTML)

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): Keep the fragment
	ref'd since the tokenizer will ref and deref it. Then turn
	TreeShared's evil against itself to get the fragment back in the
	floating 0-ref state.
        * khtml/html/html_elementimpl.h: Remove stray whitespace.
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::KHTMLParser): Initialize current to 0 in the other
	constructor too.

2003-10-06  Darin Adler  <darin@apple.com>

        * khtml/ecma/kjs_css.lut.h:
        * khtml/ecma/kjs_dom.lut.h:
        * khtml/ecma/kjs_events.lut.h:
        * khtml/ecma/kjs_html.lut.h:
        * khtml/ecma/kjs_navigator.lut.h:
        * khtml/ecma/kjs_range.lut.h:
        * khtml/ecma/kjs_traversal.lut.h:
        * khtml/ecma/kjs_views.lut.h:
        * khtml/ecma/kjs_window.lut.h:
        Regenerated, without stray semicolon.

2003-10-03  Darin Adler  <darin@apple.com>

        - updated layout tests for recent WebTextRenderer changes

        * layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
        * layout-tests/apple-only/base/www.sun.com/index-expected.txt:
        * layout-tests/css1/font_properties/font_weight-expected.txt:

2003-10-03  Chris Blumenberg  <cblu@apple.com>

        Removed eastCursor.tiff because it was added by mistake.

        * Resources/eastCursor.tiff: Removed.
        * WebCore.pbproj/project.pbxproj:

2003-10-03  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.
	
	- fixed 3398420 - crash when creating a new document.body object in <body>

	Also included David Faure's improvement to throw an exception.
	
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::setBody): Don't remove the body when null is passed in,
	as this means type error at the higher level, so throw an exception.
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::KHTMLParser): Initialize current to 0.
        (KHTMLParser::setCurrent): Ref new current and deref old; we need to
	keep it ref'd because script execution could drop the current node on the
	floor.
	(KHTMLParser::reset): Use setCurrent.
        (KHTMLParser::insertNode): Likewise.
        (KHTMLParser::reopenResidualStyleTags): Likewise.
        (KHTMLParser::popOneBlock): Likewise.
        (KHTMLParser::finished): Likewise.
        * khtml/html/htmlparser.h: Prototype setCurrent.

2003-10-03  Chris Blumenberg  <cblu@apple.com>

	Ran compress-tiffs on new cursor images.

        * Resources/eastCursor.tiff:
        * Resources/eastResizeCursor.tiff:
        * Resources/helpCursor.tiff:
        * Resources/moveCursor.tiff:
        * Resources/northEastResizeCursor.tiff:
        * Resources/northResizeCursor.tiff:
        * Resources/northWestResizeCursor.tiff:
        * Resources/southEastResizeCursor.tiff:
        * Resources/southResizeCursor.tiff:
        * Resources/southWestResizeCursor.tiff:
        * Resources/waitCursor.tiff:
        * Resources/westResizeCursor.tiff:

2003-10-03  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin, with much help from Maciej and Hyatt

        Fix for these bugs:

        <rdar://problem/3441321>: Form buttons do not respond to key events when focused
        <rdar://problem/3441060>: Form buttons do not scroll to view when focused

        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::simulateMouseClickForEvent): Added helper to simulate
        mouse clicks in elements. Used to trigger button actions in response to
        keyboard events.
        (HTMLInputElementImpl::defaultEventHandler): Improved handler to process
        key press events for radio, checkbox, image, reset, and submit buttons.
        * khtml/html/html_formimpl.h: Added simulateMouseClickForEvent function.
        * khtml/xml/dom2_eventsimpl.h:
        (DOM::EventImpl::isKeyboardEvent): Added type check virtual function.
        (DOM::KeyEventImpl::isKeyboardEvent): Ditto.
        * kwq/KWQButton.h:
        * kwq/KWQButton.mm:
        (-[KWQButton simulateClick]): New method. This makes AppKit do a 
	button click programatically for button types. For <input type=image>, 
	we just simulate a the click in the DOM since there is no real "clickable"
	AppKit widget.
        (-[KWQButton becomeFirstResponder]): Fixes the button scroll to visible when
        focused issue.
        (-[KWQButton resignFirstResponder]): Correctly give up focus when user clicks
        into the page body when a button has the focus.
        (QButton::simulateClick): QWidget bridge to the KWQButton simulateClick
	method.

2003-10-03  David Hyatt  <hyatt@apple.com>

	Removing redundant layouts and adding a few !needsLayout and !normalChildNeedsLayout
	checks to prevent extra layouts.

	Also, fixing the recalcStyle changed() bottleneck to go through view's layout and to
	not do a full repaint.  The layout method will then do the right thing (full repaint
	without INCREMENTAL_REPAINTING turned on, the precise repainting needed otherwise).
	
        Reviewed by darin

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::parseAttribute):
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::appendChildNode):
        (RenderContainer::insertChildNode):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::recalcStyle):

2003-10-02  David Hyatt  <hyatt@apple.com>

	Remove the speed hit from using the UC break locators by not using them when
	checking if the current character is &nbsp; and by also using a global text
	break locator object.
	
        Reviewed by rjw

        * khtml/rendering/break_lines.cpp:

=== Safari-108 ===

2003-10-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3398622 - Crash when JavaScript changes display style

	This was a problem with one of the many global variables in
	bidi.cpp, last, having a stale value from the last layout that
	pointed to a dead node. I fixed this by refactoring the code to
	put most of the global variables in a struct allocated on the
	stack, and pass around a reference to the struct. Seems much
	cleaner (if somewhat wordier) this way. There are still more
	global variables to kill here.
	
        * khtml/rendering/bidi.cpp:
        (khtml::BidiIterator::BidiIterator):
        (khtml::BidiStatus::BidiStatus):
        (khtml::BidiInfo::BidiInfo):
        (khtml::Bidinext):
        (khtml::first):
        (khtml::BidiIterator::increment):
        (khtml::checkMidpoints):
        (khtml::appendRunsForObject):
        (khtml::appendRun):
        (khtml::embed):
        (khtml::RenderBlock::computeHorizontalPositionsForLine):
        (khtml::RenderBlock::bidiReorderLine):
        (khtml::buildCompactRuns):
        (khtml::RenderBlock::layoutInlineChildren):
        (khtml::RenderBlock::findNextLineBreak):
        * khtml/rendering/bidi.h:
        * khtml/rendering/render_block.h:

2003-10-02  David Hyatt  <hyatt@apple.com>

	Work on exposing elements to the Acc API.  This patch gets us to the point where text
	under the mouse is voiced.
	
        Reviewed by darin

        * kwq/KWQAccObject.h:
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject initWithRenderer:]):
        (-[KWQAccObject parentObject]):
        (-[KWQAccObject parentObjectUnignored]):
        (-[KWQAccObject addChildrenToArray:]):
        (-[KWQAccObject role]):
        (-[KWQAccObject roleDescription]):
        (-[KWQAccObject value]):
        (-[KWQAccObject title]):
        (-[KWQAccObject position]):
        (-[KWQAccObject size]):
        (-[KWQAccObject accessibilityIsIgnored]):
        (-[KWQAccObject accessibilityAttributeNames]):
        (-[KWQAccObject accessibilityActionNames]):
        (-[KWQAccObject accessibilityIsAttributeSettable:]):
        (-[KWQAccObject accessibilityAttributeValue:]):
        (-[KWQAccObject accessibilityHitTest:]):
        * kwq/KWQAccObjectCache.mm:
        (KWQAccObjectCache::accObject):
        (KWQAccObjectCache::setAccObject):
        (KWQAccObjectCache::removeAccObject):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge accessibilityTree]):

2003-10-02  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        * kwq/KWQRenderTreeDebug.cpp: (quoteAndEscapeNonPrintables): Since our text rendering renders
        non-breaking spaces the same as spaces, dump them as spaces. Do the same with newlines since
        I am about to change our text rendering to do the same with newlines.

        * layout-tests: Updated test results.

2003-10-01  David Hyatt  <hyatt@apple.com>

	Avoid doing extra work when tearing down the document by checking to see if
	we're in the destruction of the document.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::removeChildNode):

2003-10-01  Richard Williamson   <rjw@apple.com>

	Fixed 3438441.  Pass extra info up to WebKit about load type, specifically is a load is triggered by JS running in an onLoad handler.

        Reviewed by Ken.

        * khtml/ecma/kjs_binding.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURL):
        (KWQKHTMLPart::openURLRequest):
        (KWQKHTMLPart::submitForm):
        (KWQKHTMLPart::urlSelected):
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow):

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge saveDocumentToPageCache]):
	Nothing changed.  Tweaked spacing.

2003-10-01  Chris Blumenberg  <cblu@apple.com>

	<rdar://problem/2942589>: CSS cursors are not implemented

        Reviewed by Dave.

        * Resources/eastCursor.tiff: Added.
        * Resources/eastResizeCursor.tiff: Added.
        * Resources/helpCursor.tiff: Added.
        * Resources/moveCursor.tiff: Added.
        * Resources/northEastResizeCursor.tiff: Added.
        * Resources/northResizeCursor.tiff: Added.
        * Resources/northWestResizeCursor.tiff: Added.
        * Resources/southEastResizeCursor.tiff: Added.
        * Resources/southResizeCursor.tiff: Added.
        * Resources/southWestResizeCursor.tiff: Added.
        * Resources/waitCursor.tiff: Added.
        * Resources/westResizeCursor.tiff: Added.
        * WebCore.pbproj/project.pbxproj:
        * khtml/css/cssparser.cpp: special-case the hand cursor to mean pointer
        (CSSParser::parseValue):
        * khtml/css/cssvalues.c: generated changes
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h: generated changes
        * khtml/css/cssvalues.in: removed the progress cursor from the list because it was messing up the mapping
        * khtml/khtmlview.cpp: call new cursor methods
        * kwq/KWQKCursor.h:
        * kwq/KWQKCursor.mm:
        (+[NSCursor _WebCore_cursorWithName:hotSpot:]): new, loads and caches cursors
        (KCursor::crossCursor): get the AppKit cross hair cursor
        (KCursor::handCursor): call _WebCore_cursorWithName:hotSpot:
        (KCursor::sizeAllCursor): ditto
        (KCursor::waitCursor): ditto
        (KCursor::whatsThisCursor): ditto
        (KCursor::eastResizeCursor): new, call _WebCore_cursorWithName:hotSpot:
        (KCursor::northResizeCursor): ditto
        (KCursor::northEastResizeCursor): ditto
        (KCursor::northWestResizeCursor): ditto
        (KCursor::southResizeCursor): ditto
        (KCursor::southEastResizeCursor): ditto
        (KCursor::southWestResizeCursor): ditto
        (KCursor::westResizeCursor): ditto

2003-10-01  David Hyatt  <hyatt@apple.com>

	Clean up our detach model so that you can always get to a document, even for
	anonymous content.  Also stubbing out and adding the accessibility objects.
	
        Reviewed by darin, mjs, john

        * ChangeLog:
        * WebCore.pbproj/project.pbxproj:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_box.cpp:
        (RenderBox::detach):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::RenderCanvas):
        * khtml/rendering/render_container.cpp:
        (RenderContainer::detach):
        (RenderContainer::addChild):
        (RenderContainer::updatePseudoChild):
        (RenderContainer::insertChildNode):
        (RenderContainer::removeLeftoverAnonymousBoxes):
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::createAnonymousFlow):
        (RenderFlow::deleteLineBoxes):
        (RenderFlow::detach):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_form.cpp:
        (RenderTextArea::detach):
        * khtml/rendering/render_form.h:
        * khtml/rendering/render_image.cpp:
        (RenderImage::RenderImage):
        (RenderImage::detach):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_inline.cpp:
        (RenderInline::addChildToFlow):
        (RenderInline::splitFlow):
        (RenderInline::renderName):
        * khtml/rendering/render_list.cpp:
        (RenderListItem::setStyle):
        (RenderListItem::detach):
        (RenderListItem::updateMarkerLocation):
        (RenderListMarker::RenderListMarker):
        * khtml/rendering/render_list.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::RenderObject):
        (RenderObject::information):
        (RenderObject::dump):
        (RenderObject::createAnonymousBlock):
        (RenderObject::remove):
        (RenderObject::detach):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::detach):
        * khtml/rendering/render_replaced.h:
        * khtml/rendering/render_table.cpp:
        (RenderTable::addChild):
        (RenderTableSection::detach):
        (RenderTableSection::addChild):
        (RenderTableRow::detach):
        (RenderTableRow::addChild):
        (RenderTableCell::detach):
        * khtml/rendering/render_table.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::detach):
        (RenderText::deleteRuns):
        * khtml/rendering/render_text.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        (DocumentImpl::~DocumentImpl):
        (DocumentImpl::detach):
        (DocumentImpl::getOrCreateAccObjectCache):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::detach):
        * kwq/KWQAccObject.h: Added.
        * kwq/KWQAccObject.mm: Added.
        (-[KWQAccObject x]):
        (-[KWQAccObject y]):
        (-[KWQAccObject width]):
        (-[KWQAccObject height]):
        (-[KWQAccObject detached]):
        (-[KWQAccObject detach]):
        (-[KWQAccObject data]):
        (-[KWQAccObject setData:]):
        (-[KWQAccObject firstChild]):
        (-[KWQAccObject lastChild]):
        (-[KWQAccObject previousSibling]):
        (-[KWQAccObject nextSibling]):
        (-[KWQAccObject parentObject]):
        * kwq/KWQAccObjectCache.h: Added.
        * kwq/KWQAccObjectCache.mm: Added.
        (KWQAccObjectCache::KWQAccObjectCache):
        (KWQAccObjectCache::~KWQAccObjectCache):
        (KWQAccObjectCache::accObject):
        (KWQAccObjectCache::setAccObject):
        (KWQAccObjectCache::removeAccObject):
        (KWQAccObjectCache::detach):
        * layout-tests/css1/pseudo/firstletter-expected.txt:
        * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
        * layout-tests/fast/css-generated-content/002-expected.txt:
        * layout-tests/fast/css-generated-content/004-expected.txt:
        * layout-tests/fast/css-generated-content/005-expected.txt:
        * layout-tests/fast/css-generated-content/006-expected.txt:
        * layout-tests/fast/selectors/039-expected.txt:
        * layout-tests/fast/selectors/039b-expected.txt:
        * layout-tests/fast/selectors/041-expected.txt:
        * layout-tests/fast/selectors/042-expected.txt:
        * layout-tests/fast/selectors/166a-expected.txt:
        * layout-tests/fast/selectors/168-expected.txt:
        * layout-tests/fast/selectors/168a-expected.txt:
        * layout-tests/fast/selectors/169-expected.txt:
        * layout-tests/fast/selectors/169a-expected.txt:
        * layout-tests/fast/text/firstline/002-expected.txt:
        * layout-tests/fast/text/firstline/003-expected.txt:

2003-10-01  David Hyatt  <hyatt@apple.com>

	Fix for 3163840, the images are mispositioned on the DHTML menus at the top of
	www.aa.com (and in many other places).  We needed to support returning the right
	value from hasProperty and tryGet for 'cssFloat'.  

	This patch also adds support for getting/setting our custom CSS properties (-khtml-*)
	and just factors the code a bit better for all the special values.
	
        Reviewed by darin

        * khtml/ecma/kjs_css.cpp:
        (cssPropertyName):
        (DOMCSSStyleDeclaration::hasProperty):
        (DOMCSSStyleDeclaration::tryGet):
        (DOMCSSStyleDeclaration::tryPut):

2003-10-01  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3437309 -- REGRESSION (100-107): Javascript menu doesn't work at www.aa.com

        * khtml/xml/dom_elementimpl.cpp: (ElementImpl::removeAttribute): Restored the old behavior
        for removeAttribute and removeAttributeNS; these don't give NOT_FOUND_ERR. But keep the
        NOT_FOUND_ERR for removeAttributeNode and removedNamedItem.

2003-10-01  Ken Kocienda  <kocienda@apple.com>

        Reviewed by me

        * kwq/KWQWidget.mm:
        (QWidget::focusPolicy): Improved comment.

2003-10-01  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej

	Fix for these bugs:

	<rdar://problem/3439736>: WebCore form button widgets do not accept focus
	<rdar://problem/3440770>: WebCore form button widgets do not take part in tabbing order

        * kwq/KWQButton.h: Add focusPolicy function declaration.
        * kwq/KWQButton.mm: 
        (-[KWQButton nextKeyView]): Add tabbing support for buttons.
        (-[KWQButton previousKeyView]): Ditto
        (-[KWQButton nextValidKeyView]): Ditto
        (-[KWQButton previousValidKeyView]): Ditto
        (QButton::focusPolicy): Add focusPolicy implementation. This calls through
        to the recently-added accessor for full keyboard access to help in the
        determination for focus policy. For now, full keyboard access must be
        turned on for buttons to receive focus.
        * kwq/KWQTextEdit.h: Remove focusPolicy specialization from this class. The
	implementation in QWidget now serves this class well.
        * kwq/KWQTextEdit.mm: Ditto
        * kwq/KWQWidget.h: Added isEnabled function. Small, unrelated cleanup to 
	move the no-implementation setFocusPolicy() and setFocusProxy() functions
	fully into the header file.
        * kwq/KWQWidget.mm:
        (QWidget::isEnabled): Added. Calls through to the Cocoa view to retrieve
	this information.
        (QWidget::focusPolicy): Much improved focus policy function is now more
	general in stipulating the conditions for focus policy, and will work for
	more widgets.

2003-10-01  David Hyatt  <hyatt@apple.com>

	Fix for 3440804, broken scrollbars in downloads window.  Make Auto be the default
	value in the enum, so that all scrollviews will be automatically initialized to be
	auto.

	Reviewed by cblu

        * kwq/KWQScrollView.h:
        * kwq/WebCoreFrameView.h:

2003-09-30  Ken Kocienda  <kocienda@apple.com>

        Reviewed by me

        * WebCore.pbproj/project.pbxproj: Made WebCoreKeyboardAccess.h a private header.

2003-09-30  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej
        
        Fix for this bug:
        
        <rdar://problem/3439688>: WebKit needs to retrieve full keyboard access preference
        
        * WebCore.pbproj/project.pbxproj:
        * kwq/KWQKHTMLPart.h: Declare keyboardUIMode accessor.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::keyboardUIMode): Implement keyboardUIMode accessor (calls through the bridge).
        * kwq/WebCoreBridge.h: Declare the bridge accessor.
        * kwq/WebCoreKeyboardAccess.h: Added. Header defines keyboard UI mode constants.
        
2003-09-30  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3375281 - Keyboard event handlers not fired if focus not in form field
	- fixed 3242927 - KeyPressed Event in Javascript don't work
	- fixed 3375353 - keyboard event.target not updated when blurring from form items
	- fixed 3183754 - returning false from key press handlers does not prevent typing or form submission
	
        * khtml/xml/dom_nodeimpl.cpp:
	(NodeImpl::dispatchKeyEvent): Force false when defaultHandled instead of
	based on a weird rule appropriate for KDE but not for us.
        * kwq/KWQKHTMLPart.mm:
	(KWQKHTMLPart::keyEvent): If there's no focus node, give the event
	to the body element instead of giving up. Also, reverse
	expectedsense of return value dispatchKeyEvent, since it returns
	true if it *didn't* swallow the event. And finally, let the key press
	event as well as the key down event for the initial NSKeyDown block
	default handling.
	* kwq/KWQListBox.mm:
        (-[KWQTableView keyDown:]): Respect return value from interceptKeyEvent:
        (-[KWQTableView keyUp:]): ditto
        * kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView keyDown:]): ditto
        (-[KWQTextAreaTextView keyUp:]): ditto
        * kwq/KWQTextField.mm:
        (-[KWQTextField textView:shouldHandleEvent:]): ditto

2003-09-30  David Hyatt  <hyatt@apple.com>

	Improvements to layout transitions and scrollbar appearance/disappearance.  
	Also implementing a fix for 3264346, overflow applied to body should apply to
	the document's scrollers.
	
        Reviewed by darin

        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::parseAttribute):
        * khtml/khtmlview.cpp:
        (KHTMLView::KHTMLView):
        (KHTMLView::~KHTMLView):
        (KHTMLView::resetScrollBars):
        (KHTMLView::clear):
        (KHTMLView::initScrollBars):
        (KHTMLView::applyBodyScrollQuirk):
        (KHTMLView::inLayout):
        * khtml/khtmlview.h:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::layout):
        * khtml/rendering/render_form.cpp:
        (TextAreaWidget::TextAreaWidget):
        * khtml/rendering/render_frames.cpp:
        (RenderFrame::slotViewCleared):
        (RenderPartObject::slotViewCleared):
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::calcMinMaxWidth):
        * khtml/rendering/render_object.cpp:
        (RenderObject::repaint):
        (RenderObject::repaintRectangle):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::setInPageCache):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::createPart):
        * kwq/KWQRenderTreeDebug.cpp:
        (write):
        (externalRepresentation):
        * kwq/KWQScrollView.h:
        * kwq/KWQScrollView.mm:
        (QScrollView::setVScrollBarMode):
        (QScrollView::setHScrollBarMode):
        (QScrollView::setScrollBarsMode):
        (QScrollView::vScrollBarMode):
        (QScrollView::hScrollBarMode):
        (QScrollView::hasVerticalScrollBar):
        (QScrollView::hasHorizontalScrollBar):
        (QScrollView::suppressScrollBars):
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge installInFrame:]):
        * kwq/WebCoreFrameView.h:

2003-09-30  David Hyatt  <hyatt@apple.com>

	Fix for 3437260, nil deref of the render style because it hasn't been set yet.
	Fallout from my incremental repainting landing.
	
        Reviewed by darin

        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::setQWidget):

2003-09-29  David Hyatt  <hyatt@apple.com>

	Fix for 3438479, tables expand on every layout when a cell has percentage height
	children.
	
        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTableSection::calcRowHeight):
        (RenderTableRow::layout):

2003-09-29  Chris Blumenberg  <cblu@apple.com>

	Fixed: <rdar://problem/3332460>: nil-deref in khtml::RenderWidget::eventFilter with onchange handler

        Reviewed by darin.

        * kwq/KWQTextField.mm:
        (-[KWQTextField controlTextDidEndEditing:]): call setHasFocus:NO last so we have the widget that lets us get to the bridge and lets us call controlTextDidEndEditing

2003-09-29  David Hyatt  <hyatt@apple.com>

	Fix for 3425053, text past the bottom of a positioned table doesn't repaint.
	3426847 is the same bug.  Both are fixed by ensuring that calcHeight doesn't actually
	do anything other than margin computation and position determination for positioned
	elements.  In reality, for weird edge cases like implying the height via explicit top and
	bottom properties, we'll still be wrong.
	
        Reviewed by darin

        * ChangeLog:
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):

2003-09-29  David Hyatt  <hyatt@apple.com>

	Make sure that timeouts updateRendering after they execute the scheduled timer
	action.  

	Also fixing 3429455, maxwidth of pres miscomputed when two blank lines occur at
	the end of a pre text run.
	
        Reviewed by darin, mjs (setTimeout fix), darin (pre fix)

        * khtml/ecma/kjs_window.cpp:
        (ScheduledAction::execute):
        * khtml/rendering/render_text.cpp:
        (RenderText::trimmedMinMaxWidth):
        (RenderText::calcMinMaxWidth):

2003-09-29  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3437292 -- Safari uses wrong characters for &and; and &or; entities

        * khtml/html/kentities.gperf: Corrected values for &and; and &or; entities.
        Checked all the rest against a list on the W3C site, and those are the only two that were wrong.
        * khtml/html/kentities.c: Regnenerated.

2003-09-26  Ken Kocienda  <kocienda@apple.com>

        Reviewed by John

	Fix for this bug:

	<rdar://problem/3435532>: REGRESSION: tabbing to textareas causes infinite recursion

	Add recursion guards to the becomeFirstResponder method, otherwise calling
	eventFilter with a FocusIn event will cause the infinite recursion
	described in the bug.

        * kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView becomeFirstResponder]):

2003-09-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

        * khtml/ecma/kjs_window.cpp:
        (Window::installTimeout): Variant that takes a function and args.
	(WindowFunc::tryCall): If the argument is a function, call the
	function variant of installTimeout instead of pointlessly passing
	the string. Also, correctly implement the code to pass extra args
	along.
        * khtml/ecma/kjs_window.h:

2003-09-25  Maciej Stachowiak  <mjs@apple.com>

	Roll out build system change since it did not actually work. :-(
	
        * WebCore.pbproj/project.pbxproj:

2003-09-25  David Hyatt  <hyatt@apple.com>

	Landing the new repainting code.  This code eliminates many redundant layouts, makes
	layout scheduling work properly when called from WebKit, cleans up relpositioned inlines
	that act as containing blocks for absolute positioned children, and eliminates the
	repaint timer.
	
        Reviewed by kocienda

        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::close):
        * khtml/khtmlview.cpp:
        (KHTMLView::KHTMLView):
        * khtml/khtmlview.h:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        (RenderBox::setPixmap):
        (RenderBox::getAbsoluteRepaintRect):
        (RenderBox::computeAbsoluteRepaintRect):
        (RenderBox::repaintIfMoved):
        (RenderBox::calcAbsoluteHorizontal):
        (RenderBox::calcAbsoluteVertical):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::layout):
        (RenderCanvas::repaintViewRectangle):
        (RenderCanvas::getAbsoluteRepaintRect):
        (RenderCanvas::computeAbsoluteRepaintRect):
        * khtml/rendering/render_canvas.h:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::addChild):
        (RenderContainer::removeChildNode):
        (RenderContainer::removeChild):
        (RenderContainer::appendChildNode):
        (RenderContainer::insertChildNode):
        * khtml/rendering/render_flexbox.cpp:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::getAbsoluteRepaintRect):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_image.cpp:
        (RenderImage::setPixmap):
        (RenderImage::layout):
        * khtml/rendering/render_inline.cpp:
        (RenderInline::addChildToFlow):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::convertToLayerCoords):
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::setPixmap):
        * khtml/rendering/render_object.cpp:
        (RenderObject::RenderObject):
        (RenderObject::setNeedsLayout):
        (RenderObject::setChildNeedsLayout):
        (RenderObject::markContainingBlocksForLayout):
        (RenderObject::containingBlock):
        (RenderObject::repaint):
        (RenderObject::repaintRectangle):
        (RenderObject::repaintAfterLayoutIfNeeded):
        (RenderObject::repaintIfMoved):
        (RenderObject::repaintPositionedAndFloatingDescendants):
        (RenderObject::getAbsoluteRepaintRect):
        (RenderObject::getAbsoluteRepaintRectIncludingDescendants):
        (RenderObject::computeAbsoluteRepaintRect):
        (RenderObject::setStyle):
        (RenderObject::container):
        (RenderObject::detach):
        (RenderObject::scheduleRelayout):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        (RenderStyle::diff):
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):
        (RenderTableRow::getAbsoluteRepaintRect):
        (RenderTableCell::computeAbsoluteRepaintRect):
        * khtml/rendering/render_table.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::insertBefore):
        (NodeBaseImpl::replaceChild):
        (NodeBaseImpl::appendChild):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::clearTimers):
        * kwq/KWQRenderTreeDebug.cpp:
        (write):
        (externalRepresentation):
        * kwq/KWQRenderTreeDebug.h:

2003-09-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * WebCore.pbproj/project.pbxproj: Don't hack install name. Instead
	of embedding into Safari, embed into WebKit as sub-umbrella.

=== Safari-107 ===

2003-09-25  Darin Adler  <darin@apple.com>

        - rolled out change to fix 3390850 because it caused a performance regression

        * khtml/misc/decoder.cpp: (Decoder::decode): Rolled out change.

2003-09-25  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Dave

	Name change: TextRun is now InlineTextBox. Some related names
	have been changed as well. There should be no change in
	behavior as a result of this patch.

        * khtml/khtml_part.cpp:
        (KHTMLPart::selectedText):
        (firstRunAt):
        (lastRunAt):
        (startAndEndLineNodesIncludingNode):
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLineBoxDecorations):
        * khtml/rendering/render_line.cpp:
        (InlineFlowBox::placeBoxesHorizontally):
        (InlineFlowBox::placeBoxesVertically):
        * khtml/rendering/render_line.h:
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::detach):
        (throw):
        (InlineTextBox::operator delete):
        (InlineTextBox::paintSelection):
        (InlineTextBox::paintDecoration):
        (InlineTextBox::checkSelectionPoint):
        (InlineTextBoxArray::InlineTextBoxArray):
        (InlineTextBoxArray::compareItems):
        (InlineTextBoxArray::findFirstMatching):
        (RenderText::deleteRuns):
        (RenderText::findNextInlineTextBox):
        (RenderText::nodeAtPoint):
        (RenderText::checkSelectionPointIgnoringContinuations):
        (RenderText::cursorPos):
        (RenderText::posOfChar):
        (RenderText::paintObject):
        (RenderText::createInlineBox):
        (RenderText::position):
        (RenderText::width):
        * khtml/rendering/render_text.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::attributedString):
        * kwq/KWQRenderTreeDebug.cpp:
        (writeTextRun):
        (write):

2003-09-25  Darin Adler  <darin@apple.com>

        Added a new layout test.

        * layout-tests/fast/forms/form-element-geometry-expected.txt: Added.
        * layout-tests/fast/forms/form-element-geometry.html: Added.

2003-09-24  Darin Adler  <darin@apple.com>

        * layout-tests/fast/table/003-expected.txt: Updated for textarea width change.

2003-09-24  David Hyatt  <hyatt@apple.com>

	Fix for 3429646, <img src="blah"<img src="foo"> should show up as two images.
	
        Reviewed by darin

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::handleResidualStyleCloseTagAcrossBlocks):
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::parseTag):

2003-09-24  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed a recent regression, and ...
        - fixed 3386544 -- ARCH: <object>s don't support transclusion like <iframe>s do

        * khtml/khtml_part.cpp: (KHTMLPart::childFrame): Added back a cast I should
        not have removed to fix the function.

2003-09-24  David Hyatt  <hyatt@apple.com>

	Fix for 3430612, crash on about:blank in updateHoverActiveState.  Just missing
	a null-check.  Also remove a hover optimization that was bogus.
	
        Reviewed by darin

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateHoverActiveState):

2003-09-24  Richard Williamson   <rjw@apple.com>

	Fixed 3420736.  Clear renderer caches when get an ATS font changed notification.  This fix may be moot depending on progress toward fixing 2695906.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (+[WebCoreBridge updateAllViews]):

2003-09-24  Darin Adler  <darin@apple.com>

        - a new test for JavaScript date parsing

        * layout-tests/fast/js/date-parse-test-expected.txt: Added.
        * layout-tests/fast/js/date-parse-test.html: Added.

2003-09-24  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed ownerElement for documents in HTML objects (helpful for some work Dave is doing)

        * khtml/khtml_part.h: Change name of frame function to childFrame for clarity.
        * khtml/khtml_part.cpp:
        (KHTMLPart::slotChildStarted): Call the frame function by its new name, childFrame.
        (KHTMLPart::slotChildCompleted): Ditto.
        (KHTMLPart::slotChildURLRequest): Ditto.
        (KHTMLPart::childFrame): Change name from frame to childFrame for clarity, and make it work
        for parts inside HTML objects, not just normal frames and iframes. The change in behavior is
        the actual fix. Note that for the three callers above, it's an error to call this when the
        result would be 0, so there's no harm in doing the extra search of HTML objects in those cases.

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::ownerElement): Call the frame function by its new
        name, childFrame. This is the caller that will benefit most from the change in behavior.

        * kwq/KWQKHTMLPart.h: Remove childFrameForPart function, which is superseded by the
        childFrame function now.
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrameHierarchy): Use childFrame instead
        of childFrameForPart.

2003-09-23  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3390850 -- Shift_JIS in meta tag ignored because <img> tag in JavaScript comes first (vintagecomp.com)

        * khtml/misc/decoder.cpp: (Decoder::decode): Don't let tags inside a script make us think we're in the body.
        Later we can enhance this even more.

2003-09-22  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3292723 -- onBlur() getting called twice on <input type=text>

        * khtml/rendering/render_replaced.cpp: (RenderWidget::eventFilter):
        Call setFocusNode(0) instead of explicitly sending a blur event, otherwise
        setFocusNode will send a second blur event later.

2003-09-22  Darin Adler  <darin@apple.com>

        - fixed 3391837 -- we list ISO-8859-8-E as visual ordering for Hebrew; it's "explicit ordering", not supported

        * kwq/mac-encodings.txt: Removed ISO-8859-8-E.
        * kwq/KWQCharsetData.c: Regenerated.

2003-09-22  Darin Adler  <darin@apple.com>

        * kwq/KWQTextEdit.mm: (QTextEdit::sizeWithColumnsAndRows): Made it compile.

2003-09-22  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3306041 -- Airborne tracking number field too narrow, tracking doesn't work (textare col property)

        * khtml/rendering/render_form.cpp: (RenderTextArea::calcMinMaxWidth): Call the QTextEdit
        to ask it what size, rather than trying to compute it. This is the same thing we do with
        other widgets, I just hadn't done textarea yet.

        * kwq/KWQTextEdit.h: Added sizeWithColumnsAndRows function.
        * kwq/KWQTextEdit.mm: (QTextEdit::sizeWithColumnsAndRows): Added. Calls through to the
        KWQTextArea object.

        * kwq/KWQTextArea.h: Added sizeWithColumns:rows: method.
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _createTextView]): Make consistent with other callers of the size mapping methods
        by using [self class] instead of NSScrollView, and getting hasHorizontalScroller and
        hasVerticalScroller from the view.
        (-[KWQTextArea setFrame:]): Make consistent with other callers of the size mapping methods
        by using [self class] instead of NSScrollView.
        (-[KWQTextArea sizeWithColumns:rows:]): Added. Starts by computing the width and height of the
        columns specified, using a canonical width of a "0" character. Then converts that to a container
        size by adding line fragment padding. Then converts that into the text view size by adding the
        text container inset. Then converts that into the scroll view size by calling frameSizeForContentSize:.

2003-09-22  Darin Adler  <darin@apple.com>

        * WebCore.pbproj/project.pbxproj: Rename Mixed build style to OptimizedWithSymbols.

2003-09-22  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - research determined we were using nothing defined in config.h, so I got rid of it

        * Makefile.am: Removed rules to generate config.h.
        * config.h: Removed.

        * WebCore.pbproj/project.pbxproj: Removed define of HAVE_CONFIG_H.

        * WebCorePrefix.h: Removed include of <config.h>.

        * ForwardingHeaders/config.h: Emptied this file out. Can't remove this because there are
        some includes of <config.h> without HAVE_CONFIG_H wrappers.

2003-09-21  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3106411 -- show title attribute for page elements in tooltip on mouseover (important for PeopleSoft)

        * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Set the value of a new element dictionary
        key, WebCoreElementTitleKey. This gives the title for an element, walking up the DOM tree as necessary
        to find it. It's used for tool tips at the WebKit level.
        * kwq/WebCoreBridge.h: Added WebCoreElementTitleKey and WebCorePageCacheStateKey.

        * WebCore.exp: Added all the constants from WebCoreBridge.h; these should be exported even though they
        are not being used at the moment because the "WebCore and WebKit use the same constant keys" hack we
        are doing at the WebKit level means we can just use the WebKit keys on the WebKit side.
        * WebCore-combined.exp: Regenerated.

2003-09-20  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3328481 -- selection in select element list box does not scroll into view when set programatically

        * kwq/KWQListBox.mm: (QListBox::setSelected): Scroll newly-selected item into view.

2003-09-20  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3429384 -- REGRESSION (89-90): nil-deref in KHTMLPart::write() (cheshiremotorcyclesalvage.com)

        * khtml/khtml_part.cpp: (KHTMLPart::write): Add a nil check.

2003-09-20  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - more fixes for the W3C DOM tests

        * khtml/dom/dom_doc.cpp: (Document::createAttributeNS): Check that the attribute name
        is valid and throw INVALID_CHARACTER_ERR if not.

        * khtml/dom/dom_element.cpp:
        (Element::removeAttributeNode): Get the attribute name properly. The old code would always
        get a 0, so this function would always fail.
        (Element::setAttributeNS): Check that the attribute name is valid and throw
        INVALID_CHARACTER_ERR if not.
        (Element::setAttributeNodeNS): Remove redundant exception checks that are also done by
        setNamedItem in the implementation. I had to change the implementation of one, so I decided
        it was better not to have any duplication.

        * khtml/xml/dom_docimpl.h: Added isValidName function.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createHTMLElement): Check that the attribute name is valid and throw
        INVALID_CHARACTER_ERR if not.
        (DocumentImpl::isValidName): Added. Used to check for valid names.

        * khtml/xml/dom_elementimpl.cpp:
        (NamedAttrMapImpl::setNamedItem): Don't do the document check until after checking for
        the "replace self" case. Otherwise we raise a spurious "in use" exception.
        (NamedAttrMapImpl::addAttribute): Point the new attribute at the element.

2003-09-19  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	Roll out old fix for 3410980 and do a new better fix.

        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::close):
        * khtml/khtml_part.h:
        * kwq/KWQKHTMLPart.mm:
        * kwq/WebCoreBridge.h:

2003-09-19  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - update layout tests for Dave's change

        * layout-tests/apple-only/base/www.excite.com/index-expected.txt:
        * layout-tests/fast/block/positioning/051-expected.txt:
        * layout-tests/fast/overflow/003-expected.txt:

        - fixed 3426272 -- sites that use text-shadow cause leaks (QPainter::setShadow)

        * kwq/KWQPainter.mm: (QPainter::setShadow): Release the color space and color.

        - fixed some errors that caused failures in the W3C DOM suite

        * khtml/ecma/kjs_binding.cpp:
        (DOMObject::get): Put "code" in the error object.
        (DOMObject::put): Put "code" in the error object.
        (DOMFunction::get): Put "code" in the error object.

        * khtml/ecma/kjs_dom.cpp: (DOMCharacterDataProtoFunc::tryCall):
        Add checks for negative count values. Not clear whether this change is
        really great, but it helps us pass W3C DOM tests and clearly won't affect
        normal pages in any bad way.

        * khtml/xml/dom_elementimpl.cpp:
        (AttrImpl::AttrImpl): Set m_specified to true. Since we never set up the
        attributes from the DTD anyway, this is fine for now. If we ever go crazy
        and implement that, then the bit field is sitting here waiting for us.
        (NamedAttrMapImpl::removeNamedItem): The comment from KHTML says they
        don't raise the not found exception because "the DOM 2 spec doesn't say
        you should". But the DOM Level 1 specification clearly does, and the W3C
        DOM Level 1 Core test requires it, so I'm putting it in.

        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkAddChild): Typo; this was
        returning the wrong error code in the "wrong document" case.

        * khtml/xml/dom_stringimpl.cpp:
        (DOMStringImpl::remove): Fix overflow case.
        (DOMStringImpl::substring): Fix overflow case.
        
2003-09-19  David Hyatt  <hyatt@apple.com>

	Fix for 3401409, fix negative z-index.  This code actually substantially
	reworks layers to be more efficient in both painting and event handling.
	It also fixes bugs with clipping as well as with negative z-indices.
	
        Reviewed by kocienda

        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        (RenderBox::repaintRectangle):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_frames.cpp:
        (RenderFrameSet::nodeAtPoint):
        * khtml/rendering/render_frames.h:
        * khtml/rendering/render_image.cpp:
        (RenderImage::nodeAtPoint):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_inline.cpp:
        (RenderInline::nodeAtPoint):
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::RenderLayer):
        (RenderLayer::~RenderLayer):
        (RenderLayer::updateLayerPosition):
        (RenderLayer::stackingContext):
        (RenderLayer::enclosingPositionedAncestor):
        (RenderLayer::transparentAncestor):
        (RenderLayer::addChild):
        (RenderLayer::removeChild):
        (RenderLayer::convertToLayerCoords):
        (RenderLayer::checkScrollbarsAfterLayout):
        (RenderLayer::paintScrollbars):
        (RenderLayer::paint):
        (setClip):
        (restoreClip):
        (RenderLayer::paintLayer):
        (RenderLayer::nodeAtPoint):
        (RenderLayer::nodeAtPointForLayer):
        (RenderLayer::calculateClipRects):
        (RenderLayer::calculateRects):
        (RenderLayer::intersectsDamageRect):
        (RenderLayer::containsPoint):
        (hoverAncestor):
        (commonAncestor):
        (RenderLayer::updateHoverActiveState):
        (sortByZOrder):
        (RenderLayer::dirtyZOrderLists):
        (RenderLayer::updateZOrderLists):
        (RenderLayer::collectLayers):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):
        (RenderObject::document):
        (RenderObject::renderArena):
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::nodeAtPoint):
        * khtml/rendering/render_text.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        (DocumentImpl::~DocumentImpl):
        (DocumentImpl::recalcStyleSelector):
        (DocumentImpl::setHoverNode):
        * khtml/xml/dom_docimpl.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::paint):
        (KWQKHTMLPart::paintSelectionOnly):
        (KWQKHTMLPart::adjustPageHeight):
        * kwq/KWQRect.h:
        * kwq/KWQRenderTreeDebug.cpp:
        (write):
        (writeLayers):
        (externalRepresentation):

2003-09-19  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        * layout-tests: Updated for my mini-controls change.

2003-09-19  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - do the prep work for the mini controls feature; Dave will finish this

        * khtml/rendering/render_form.cpp: (RenderFormElement::updateFromElement):
        Tell the widget about the font size. Our widgets use the font size to
        decide whether to use Aqua normal, small, or mini.

        * kwq/KWQButton.h: Add setFont.
        * kwq/KWQButton.mm:
        (QButton::setFont): Set control size based on font.
        (KWQNSControlSizeForFont): Determine control size given a font. Dave is going
        to tweak this later.

        * kwq/KWQCheckBox.h: Add dimensions function for metrics for each control size.
        * kwq/KWQCheckBox.mm:
        (QCheckBox::sizeHint): Use dimensions.
        (QCheckBox::frameGeometry): Use dimensions.
        (QCheckBox::setFrameGeometry): Use dimensions.
        (QCheckBox::baselinePosition): Use dimensions.
        (QCheckBox::dimensions): Added. Has newly tweaked values for all dimensions for
        all three control sizes.

        * kwq/KWQComboBox.h: Add setFont and dimensions.
        * kwq/KWQComboBox.mm:
        (QComboBox::sizeHint): Use dimensions.
        (QComboBox::frameGeometry): Use dimensions.
        (QComboBox::setFrameGeometry): Use dimensions.
        (QComboBox::baselinePosition): Use dimensions.
        (QComboBox::setFont): Use dimensions.
        (QComboBox::dimensions): Added. Has newly tweaked values for all dimensions for
        all three control sizes.

        * kwq/KWQFileButton.mm: (KWQFileButton::baselinePosition): Change to adapt to
        flipped version of file button NSControl.

        * kwq/KWQPushButton.h: Add dimensions function for metrics for each control size.
        * kwq/KWQPushButton.mm:
        (QPushButton::sizeHint): Use dimensions.
        (QPushButton::frameGeometry): Use dimensions.
        (QPushButton::setFrameGeometry): Use dimensions.
        (QPushButton::baselinePosition): Use dimensions.
        (QPushButton::dimensions): Added. Has newly tweaked values for all dimensions for
        all three control sizes.

        * kwq/KWQRadioButton.h: Add dimensions function for metrics for each control size.
        * kwq/KWQRadioButton.mm:
        (QRadioButton::sizeHint): Use dimensions.
        (QRadioButton::frameGeometry): Use dimensions.
        (QRadioButton::setFrameGeometry): Use dimensions.
        (QRadioButton::baselinePosition): Use dimensions.
        (QRadioButton::dimensions): Added. Has newly tweaked values for all dimensions for
        all three control sizes.

2003-09-19  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
	
	- fixed 3410980 - FileMaker: going forward with an empty forward list makes a frame come out blank sometimes
	
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::close): Remove redundant check removed.
        * khtml/khtml_part.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::scheduleHistoryNavigation): Only call the base class
	method to actually schedule when it's possible to go back or forward
	that number of steps.
        * kwq/WebCoreBridge.h:

2003-09-17  John Sullivan  <sullivan@apple.com>

	- WebCore part of fix for 3157018 -- Would like option to
	not print backgrounds	

        Reviewed by Darin

        * kwq/KWQKHTMLSettings.h:
	add _shouldPrintBackgrounds field and accessors

        * kwq/WebCoreSettings.h:
	add shouldPrintBackgrounds field and accessors
        * kwq/WebCoreSettings.mm:
        (-[WebCoreSettings setShouldPrintBackgrounds:]):
	new method, passes value to KHTMLSettings
        (-[WebCoreSettings shouldPrintBackgrounds]):
	new method

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge styleSheetForPrinting]):
	new method, returns a style sheet that has backgrounds
	turned off if preference is set that way.
        (-[WebCoreBridge reapplyStylesForDeviceType:]):
	if printing, set the printStyleSheet to the one we
	created based on the preferences. (KHTML has always
	had support for a special printStyleSheet, but it was
	only being used in !APPLE_CHANGES code.)

        * khtml/rendering/render_style.h:
	add shouldCorrectTextColor boolean field and accessors 

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::recalcStyle):
	tell style to correct text colors if backgrounds aren't being printed

        * khtml/rendering/render_text.cpp:
        (TextRun::paintSelection):
	added comment
        (simpleDifferenceBetweenColors):
	new function, computes a quick measure of difference
	between colors
        (correctedTextColor):
	if text and background colors are too similar, returns
	lightened or darkened text color
        (RenderText::paintObject):
	if style says to correct text colors, call correctedTextColor

2003-09-17  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3423404 -- REGRESSION: Japanese page appears blank due to unexpected kTECPartialCharErr

        * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertOneChunkUsingTEC): In the case where we're already
        going from the small buffer back to the large one, treat kTECPartialCharErr the same as noErr.
        Otherwise we'll get confused and drop the contents of the big buffer.
        (KWQTextDecoder::convert): Improve the debugging code a bit (still turned off).

=== WebCore-105 ===

2003-09-15  Ken as Darin  <darin@apple.com>

        Reviewed by Darin and Don.

        - fixed 3419957 -- REGRESSION: lines drawn across multiple columns at washingtonpost.com

        * khtml/rendering/render_box.cpp: (RenderBox::calcWidth): Always use the width of the line
        rather than the width of the containing block for "flow around floats" blocks (<hr>).
        This undoes half of the change made to fix bug 3384609.

2003-09-15  Darin Adler  <darin@apple.com>

        Reviewed by Ken and Don.

        - fixed 3417604 -- REGRESSION: dragging scroll thumb causes textarea contents to vanish

        * kwq/KWQTextArea.mm: (-[KWQTextArea initWithFrame:]): Deallocated cached graphics state for
        the text view as well as for the clip view.

2003-09-13  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3420547 -- REGRESSION: repro crash in khtml::RenderBlock::findNextLineBreak (wisdomtips.com)

        * khtml/rendering/render_block.cpp: (RenderBlock::addChildToFlow): Exclude BR elements when looking for
        an element to process first-letter style.

2003-09-13  Darin Adler  <darin@apple.com>

        * layout-tests/fast/frames/empty-frame-src-expected.txt: Updated test results that changed
        due to the change in our handling of frame borders.

=== WebCore-104 ===

2003-09-12  Richard Williamson   <rjw@apple.com>

	Fixed 3420097.  Pass flag up to WebKit indicating that redirects are being cancelled during a pending load.

        Reviewed by Darin.

        * khtml/khtml_part.cpp:
        (KHTMLPart::cancelRedirection):
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::provisionalLoadStarted):
        (KWQKHTMLPart::redirectionTimerStartedOrStopped):
        * kwq/WebCoreBridge.h:

=== WebCore-103 ===

2003-09-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * khtml/css/html4.css: Use the same hardcoded default size for
	OBJECT and EMBED tags as for IFRAME.

2003-09-12  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3403223 -- <input type=file> with initial value causes exception, bad results afterwards, when submitted

        * kwq/KWQFile.mm: (QFile::QFile): Don't pass an empty string to fileSystemRepresentation,
        because that will cause an exception.

=== WebCore-101 ===

2003-09-11  Richard Williamson   <rjw@apple.com>

	Fixed 3406671.  Added a private method for Mail to get selection
	rect.

	Fixed 3417688.  Don't allow https page into page cache.

        Reviewed by Darin.

        * kwq/KWQFrame.h:
        * kwq/KWQFrame.mm:
        (QFrame::setFrameStyle):
        (QFrame::frameWidth):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::canCachePage):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge selectionRect]):
        (-[WebCoreBridge visibleSelectionRect]):
        (-[WebCoreBridge selectionImage]):
        (-[WebCoreBridge adjustViewSize]):

=== Safari-100 ===

2003-09-09  Darin Adler  <darin@apple.com>

        Reviewed by Chris.

        - fixed 3373654 -- REGRESSION: Yahoo chat applet reloads over and over due to "baseURL" param name conflict

        After some research by the Java team, we discovered that there was no need to
        pass in baseURL at all This patch gets rid of that by only passingindividual specified
        arguments, rather than passing all the arguments, as applet parameters.

        * khtml/rendering/render_applet.cpp: (RenderApplet::processArguments): Remove the
        call to KJavaApplet::processArguments, because we only want the individual arguments.
        * kwq/KWQKJavaAppletWidget.h: Implement setAppletClass, setAppletName, setArchives, and
        setCodeBase. Remove processArguments.
        * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::setParameter): Lowercase all the
        parameters as we put them in the dictionary, since this is the semantics required by Java.

=== Safari-99 ===

2003-09-07  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3411827 -- REGRESSION: text drawing after text-shadow does not respect smoothing style (asahi.com)

        * kwq/KWQPainter.mm: (QPainter::clearShadow): Call CGContextSetShadowWithColor with a color of NULL,
        which actually clears the shadow, rather than CGContextSetShadow, which sets a black shadow (even
        if it is zero pixels in size).

=== Safari-98 ===

2003-09-05  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

	Fix for this bug:

	<rdar://problem/3226083>: REGRESSION (Panther): white box 
	overlaying select lists at nvidia.com drivers page

        * kwq/KWQListBox.mm:
        (QListBox::QListBox): Re-add releaseGState fix that Darin
	added, but then removed. It turns out that we do need 
	this workaround in place to get proper drawing.

	Fix for this bug:

	<rdar://problem/3310943>: REGRESSION (Panther): textareas 
	in forms sometimes draw blank (bugreporter)

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea initWithFrame:]): Same fix as above.

2003-09-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed - REGRESSION (85-92): Javascript on page isn't triggered by typed characters (onKeyUp)

	(This actually also requires an AppKit fix to be a full fix.)

        * kwq/KWQListBox.mm:
        (-[KWQTableView keyDown:]): Added. Send event through DOM.
        (-[KWQTableView keyUp:]): Likewise.
        (-[KWQTableView becomeFirstResponder]): Added. Report focus change
	to DOM.
	* kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView keyUp:]): Added. Send event through DOM.
        * kwq/KWQTextField.mm:
        (-[KWQTextField textView:shouldHandleEvent:]): Pass NSKeyUp events too
	(not going to work until we get an AppKit fix).

2003-09-04  John Sullivan  <sullivan@apple.com>

	- fixed 3399880 -- Repro crash when filling out a form to
	download Macromedia software. I managed to check in this
	ChangeLog comment a few days ago without actually checking
	in the changed file, weird.

        Reviewed by Chris

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementForView:]):
	check for nil widget before dereferencing

2003-09-04  David Hyatt  <hyatt@apple.com>

	Fix for 3408630, leak of child frame parts caused by a missing deref when frames
	get detached from their parent frame list.
	
        Reviewed by mjs

        * kwq/KWQKHTMLPart.mm:
        (KHTMLPart::frameDetached):

2003-09-04  Darin Adler  <darin@apple.com>

        * layout-tests/apple-only/base/www.msn.com/index-expected.txt: Update for residual style fix.
        * layout-tests/fast/invalid/003-expected.txt: Update for residual style fix.

2003-09-04  Darin Adler  <darin@apple.com>

        * kwq/KWQRenderTreeDebug.cpp: (write): Fix clip rectangle computation.
        * layout-tests: Update test results.

=== Safari-97 ===

2003-09-03  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * khtml/khtml_part.cpp:
	(KHTMLPart::clear): Un-ifdef cleanup of frames, and add similar
	cleanup for objects. Replace delete with deref.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::createPart): Add an extra ref to KHTMLParts since
	both the bridge and the parent part want to deref.

2003-09-03  David Hyatt  <hyatt@apple.com>

	Fix for 3404398, leak in residual style code.  The code that built up the
	residualStyleStack was messed up and discarded tags.
	
        Reviewed by mjs

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::popBlock):

2003-09-02  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

	Fix for this bug:

	<rdar://problem/3399169>: 4 leaks of DOMString objects (Mail)

	Remove circular reference between AttributeImpl and AttrImpl objects.
	This was causing the leak.

        * khtml/xml/dom_elementimpl.cpp:
        (AttributeImpl::allocateImpl):

2003-09-02  David Hyatt  <hyatt@apple.com>

	Fix for 3359408, DirWS should not be used when collapsing/stripping spaces,
	since only ASCII spaces are supposed to be collapsed/stripped.
	
        Reviewed by mjs

        * khtml/rendering/bidi.cpp:

2003-09-02  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3403388 -- decoder mishandles pages which fill the decoding buffer (mainly ISO-2022-JP)

        * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertUsingTEC): Keep decoding, passing in no additional bytes,
        until we get noErr, don't ever stop after a kTECOutputBufferFullStatus error.

2003-09-02  David Hyatt  <hyatt@apple.com>

	Fix for 3404452, paint errors on mezzoblue.com's links list.  There was a simple
	math error in the invalidation rect computation.
	
        Reviewed by mjs

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::repaint):
        
2003-09-01  John Sullivan  <sullivan@apple.com>

	- WebCore part of fix for 3402489 -- REGRESSION (7B48-7B55): Some 
	printed web pages are too small (width is half a page)

	This was a regression caused by the fix for 3378810.

        Reviewed by Maciej

        * kwq/WebCoreBridge.h:
	add adjustingViewSize flag to forceLayout and forceLayoutForPageWidth:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge forceLayoutAdjustingViewSize:]):
	respect new flag while we are set up for printing.
        (-[WebCoreBridge forceLayoutForPageWidth:adjustingViewSize:]):
	ditto
        (-[WebCoreBridge adjustFrames:]):
	pass NO for new flag here

2003-09-01  John Sullivan  <sullivan@apple.com>

        * kwq/KWQPainter.mm:
        (QPainter::drawLine):
	Removed the ERROR that warns of the CG memory trashing bug, now
	that we are enough builds away from it that it is (almost?) never
	reported anymore.

=== Safari-96 ===

2003-08-29  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3397775 21 leaks from CSS parser running PLT
	
        * khtml/css/css_ruleimpl.cpp:
        (CSSMediaRuleImpl::~CSSMediaRuleImpl): Clear the parent for all contained
	rules.
        (CSSMediaRuleImpl::append): Call insertRule.
        (CSSMediaRuleImpl::insertRule): set parent of the rule to this media rule.
        (CSSRuleListImpl::append): Call insertRule to cover all the relevant
	additional handling, instead of adding straight to the list.
        * khtml/css/css_ruleimpl.h:

2003-08-29  John Sullivan  <sullivan@apple.com>
	
	- fixed 3399880 -- Repro crash when filling out a form to 
	download Macromedia software

        Reviewed by Chris

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementForView:]):
	check for nil widget before dereferencing

2003-08-28  David Hyatt  <hyatt@apple.com>

	Fix for 3381377, fix the calcBlockMinMaxWidth function to not use the
	renderobject's computed margins except when it has to.  This makes
	table cells with align=right not mess up and fixes margin problems
	in general with floated elements and table cells.

	Since XUL boxes also use a similar function and since it had a similar
	error, vertical XUL boxes have been patched as well.
	
        Reviewed by gramps

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_flexbox.cpp:

2003-08-28  David Hyatt  <hyatt@apple.com>

	Fix for 3398463, a regression caused by an unintended line movement.
	<br/> was no longer being treated just like <br> in HTML.
	
        Reviewed by gramps

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::parseTag):

=== Safari-95 ===

2003-08-27  Richard Williamson   <rjw@apple.com>

	Fixed 3359408.  DON'T treat unicode whitespace as whitespace when collapsing spaces.

        Reviewed by David Hyatt.

        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_text.cpp:
        (RenderText::trimmedMinMaxWidth):
        (RenderText::calcMinMaxWidth):
        (RenderText::containsOnlyWhitespace):
        * khtml/xml/dom_stringimpl.cpp:

2003-08-27  David Hyatt  <hyatt@apple.com>

	Fix for 3396962, hang on quote.com.  Fieldsets with display:inline should be treated
	like inline-blocks. This matches WinIE's behavior.
	
        Reviewed by mjs

        * khtml/rendering/render_form.cpp:
        (RenderFieldset::setStyle):
        * khtml/rendering/render_form.h:

2003-08-26  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - follow-on to fix for 3310943 -- REGRESSION (Panther): textareas in forms sometimes draw blank (bugreporter)

        * kwq/KWQListBox.mm: (QListBox::QListBox): Remove call to releaseGState. This was here to
        work around a problem we thought was an AppKit bug, but it turns out it was caused by
        NSView hackery in WebKit. We now do the WebKit part in a way that does not create the problem.

2003-08-26  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3031562 -- most forms don't work in certain configurations because of a bug in KWQVariant

        * kwq/KWQVariant.mm: (QVariant::QVariant): Set the b element of the union, not the d element,
        in the constructor for bool.

2003-08-26  David Hyatt  <hyatt@apple.com>

	Fix for 3395950, better support for self-collapsing blocks.  Make them obey
	clear properly and also change the definition of self-collapsing to match
	the CSS2.1 specification.
	
        Reviewed by gramps

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:

2003-08-26  David Hyatt  <hyatt@apple.com>

	Fix for 3335175, www.calstone.com renders as blank.  The fix is to deliberately
	introduce an error into our HTML parsing code that causes us to honor self-closing
	XML-style <script/> tags.  This matches Mozilla and Opera behavior (both of them
	have this bug), but it does not match WinIE.
	
        Reviewed by mjs

        * khtml/html/htmltokenizer.cpp:

2003-08-26  David Hyatt  <hyatt@apple.com>

	Fix for 3286229, popup menu misplaced.  <form> needs to be allowed as a child of
	<h1>-<h6> tags.  All other browsers allow this.
	
        Reviewed by darin

        * khtml/html/dtd.cpp:

2003-08-26  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - re-fixed 3366542 -- filename with non-ASCII name left out of Content-Disposition for <input type=file>

        * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData): Added missing # sign.

2003-08-26  David Hyatt  <hyatt@apple.com>

	Fix for 3394107, make sure the display mutation code doesn't mutate objects with
	display: none set.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:

2003-08-22  David Hyatt  <hyatt@apple.com>

	Fix for 3388363, copying a word in a list item copied too much.  The code that checked
	for the bullet would add in too much text sometimes.
	
        Reviewed by john

        * kwq/KWQKHTMLPart.mm:
        (isTextFirstInListItem):
        (KWQKHTMLPart::attributedString):

2003-08-21  Darin Adler  <darin@apple.com>

        * Makefile.am: Work around DLCFN issue to prevent constant churn of config.h.
        * config.h: Regenerated without DLCFN.

2003-08-21  Darin Adler  <darin@apple.com>

        * khtml/khtmlview.h: Formatting tweak.

2003-08-21  Chris Blumenberg  <cblu@apple.com>

	Fixed: <rdar://problem/3386673>: a particular fidelity.com "Log in" link does nothing because of cross-domain JavaScript rules

        Reviewed by mjs.

        * config.h:
        * khtml/ecma/kjs_window.cpp:
        (Window::get): allow other frames to get the location object
        (Window::isSafeScript): added JS logging
        (Location::get): don't allow other frames to access location attributes
        (LocationFunc::tryCall): don't allow other frames to call functions on the location object

2003-08-21  Richard Williamson   <rjw@apple.com>
	
	Fixed 3378810.  Avoid resizing frame from drawRect: when printing.  This will corrupt the graphics context.

        Reviewed by Hyatt.

        * khtml/khtmlview.cpp:
        (KHTMLView::adjustViewSize):
        * khtml/khtmlview.h:
        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::layout):
        * kwq/KWQScrollView.mm:
        (QScrollView::resizeContents):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge adjustViewSize]):

=== Safari-94 ===

2003-08-21  David Hyatt  <hyatt@apple.com>

	Fix for 3387302, floats weren't being allowed to be relatively positioned.  The
	fix is trivial.  Stop making floating/relpositiion setting an if/else and just make
	it two ifs.
	
        Reviewed by darin

        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):

2003-08-21  David Hyatt  <hyatt@apple.com>

	Fix for 3384635, breakable unicode characters that were preceded by multiple spaces
	accidentally added in those spaces to their widths.
	
        Reviewed by rjw and gramps

        * khtml/rendering/bidi.cpp:

2003-08-20  David Hyatt  <hyatt@apple.com>

	Fix for 3384609.  Objects that want to dodge floats should fill the line width instead
	of the containing block width only if their widths are auto.  If widths are specified
	explicitly, then ccontaining block width should be honored.
	
        Reviewed by john

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidth):
        * khtml/rendering/render_table.cpp:
        (RenderTable::calcWidth):

2003-08-20  Richard Williamson   <rjw@apple.com>

	UCFindTextBreak will report false if we have a sequence of 0xa0 0x20 (nbsp, sp), so we explicity check for that case.  Filed 3386852 to track this problem, meanwhile added a work-around.  This problem was revealed after adding the fix for 3242508.

        Reviewed by Dave.

        * khtml/rendering/break_lines.cpp:

2003-08-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3248069 -- Safari does not support ISO Latin 10 (ISO-8859-16, romanian) coding.

        * kwq/mac-encodings.txt: Added ISO-8859-16, which maps to ISO Latin-10.
        * kwq/KWQCharsetData.c: Regenerated.
        * kwq/KWQCharsets.mm: Add definition of kCFStringEncodingISOLatin10, since this encoding
        is currently only in TextCommon.h, not in CFStringEncodingExt.h.

2003-08-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- fixed 3384963 - REGRESSION: assertion in copyPathRemovingDots, crash parsing URL in snippet editor
	
        * kwq/KWQKURL.mm:
        (copyPathRemovingDots): It's OK if the path is entirely empty.

2003-08-20  David Hyatt  <hyatt@apple.com>

	Fix for 3385211, <td>s should ignore the float property in quirks mode.  This
        patch cleans up the adjustments of <td>s and <table>s and moves the code into
        the style selector (instead of cluttering up the rendering code).

	Fix for 3385476, generated content not built correctly.  All generated content
	should be placed inside a containing object that actually gets the pseudo-style.
	
        Reviewed by rjw

        * ChangeLog:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::updatePseudoChild):
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):

2003-08-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- fixed 3292036 - albertsons.com world leak of 2 WebDataSource and 2 WebHTMLRepresentation objects
	
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::canCachePage): Test for parentPart() even if there
	is no document.

2003-08-20  Richard Williamson   <rjw@apple.com>

	Fixed 3242508.  Japanese (and other non latin1 scripts) line breaking incorrect when mixed with latin1.

        Reviewed by Dave.

        * khtml/rendering/break_lines.cpp:

	Checkin fix for earlier bug that was already approved!

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::attributedString):

2003-08-19  David Hyatt  <hyatt@apple.com>

	Fixes for 3380766 and 3381867.  One is a table bug with amazon.com where colspans
	were losing percentage width values.  The other is a bug where floats aren't dirtying
	objects into which they intrude when doing layout.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/table_layout.cpp:
        (AutoTableLayout::calcEffectiveWidth):

2003-08-19  Chris Blumenberg  <cblu@apple.com>

	Fixed: <rdar://problem/3379336>: flash on front page of http://www.westportmotorsports.com is broken

        Reviewed by darin.

        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::updateWidget): Ignore the PARAM tags and only use attributes inside the OBJECT tag when the EMBED tag is omitted.

2003-08-19  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3343681 -- clicking on a disabled submit button submits the form!

        This turned out to be a problem with code in dispatchGenericEvent that sent
        DOMActivate events even when the form element was disabled.

        * khtml/xml/dom_nodeimpl.h: Add virtual disabled() member function.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::dispatchGenericEvent): Don't send DOM activate events for disabled elements.
        (NodeImpl::handleLocalEvents): Don't send mouse events for disabled elements. But we do
        want those events to pass through the bubble and capture phases, just avoid triggering
        any listeners on this node itself.
        (NodeImpl::disabled): Added default implementation that returns false.

        * khtml/html/html_formimpl.h: Removed the disabled() function's inline implementation
        since it's now virtual and it's not helpful to inline virtual functions.
        * khtml/html/html_formimpl.cpp:
        (HTMLGenericFormElementImpl::disabled): Moved this method into the .cpp file since it's
        now virtual and it's not helpful to inline virtual functions.

2003-08-18  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3380411 -- Unicode supplementary characters cut in half in text control with maxlength set

        * kwq/KWQTextField.mm:
        (-[KWQTextField setMaximumLength:]): Enforce maximum length based on number of composed character
        sequences rather than on number of UTF-16 values. This helps with both surrogate pairs (the supplementary
        characters mentioned in the bug report) and composed character sequences.
        (-[KWQTextField setStringValue:]): Ditto.
        (-[KWQTextFieldFormatter isPartialStringValid:newEditingString:errorDescription:]): Ditto.
        (-[NSString _KWQ_numComposedCharacterSequences]): Added. Computes the length of a string in terms of
        number of composed character sequences.
        (-[NSString _KWQ_truncateToNumComposedCharacterSequences:]): Added. Truncates a string in terms of
        number of composed character sequences.

2003-08-18  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3299893 -- oncontextmenu support

        * kwq/WebCoreBridge.h: Added sendContextMenuEvent: method.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendContextMenuEvent:]): Added.
        Calls sendContextMenuEvent on the part.

        * kwq/KWQKHTMLPart.h: Added sendContextMenuEvent member function.
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::sendContextMenuEvent): Added. Sets up
        a suitable mouse event and calls dispatchMouseEvent for CONTEXTMENU_EVENT.

        * khtml/ecma/kjs_dom.cpp: Added oncontextmenu to DOMNode's list of properties.
        (DOMNode::getValueProperty): Added case for OnContextMenu.
        (DOMNode::putValue): Added case for OnContextMenu.
        * khtml/ecma/kjs_dom.h: Added constant for OnContextMenu.
        * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseAttribute):
        Added case for ATTR_ONCONTEXTMENU.
        * khtml/misc/htmlattrs.in: Added oncontextmenu.
        * khtml/xml/dom2_eventsimpl.cpp:
        (EventImpl::typeToId): Added case for CONTEXTMENU_EVENT.
        (EventImpl::idToType): Added case for CONTEXTMENU_EVENT.
        * khtml/xml/dom2_eventsimpl.h: Added CONTEXTMENU_EVENT.

        * khtml/ecma/kjs_dom.lut.h: Regenerated.
        * khtml/misc/htmlattrs.c: Regenerated.
        * khtml/misc/htmlattrs.h: Regenerated.

2003-08-18  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3381295 -- regular expression matches for text with UTF-16 surrogates will give incorrect results

        * kwq/KWQRegExp.mm: (QRegExp::match): Removed local copy of convertCharacterOffsetsToUTF8ByteOffsets
        and its reverse. Instead use convertUTF16OffsetsToUTF8Offsets and its reverse, now available from
        <JavaScriptCore/ustring.h>.

        - added test for the URI encoding and decoding functions in JavaScriptCore

        * layout-tests/fast/js/global/encode-URI-test-expected.txt: Added.
        * layout-tests/fast/js/global/encode-URI-test.html: Added.

2003-08-15  Chris Blumenberg  <cblu@apple.com>

	Fixed: <rdar://problem/3380418>: Ignore specified string encoding when constructing file, mailto and help URLs

        Reviewed by mjs, darin.

        * kwq/KWQKURL.mm:
        (KURL::KURL): store the URL string as UTF-8 when the URL is file, mailto and help.

2003-08-17  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3366542 -- filename with non-ASCII name left out of Content-Disposition for <input type=file>

        * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData):
        Do the &-encoding thing on the filename. This is what Gecko does.

2003-08-14  Maciej Stachowiak  <mjs@apple.com>

        Fixed by Darin, reviewed by me (and originally figured out by John).

	- fixed 3375592 - New Yahoo Maps doesn't work right
	
        * kwq/KWQTextCodec.mm:
        (KWQTextDecoder::convertUTF16): Don't pass through null characters.
        (KWQTextDecoder::appendOmittingNullsAndBOMs): Ditto.
        (KWQTextDecoder::convertUsingTEC): Ditto.

=== Safari-93 ===

2003-08-14  Vicki Murley  <vicki@apple.com>

        Reviewed by John. 

        * WebCore.pbproj/project.pbxproj: deleted WebCore.order from the project.

2003-08-14  Vicki Murley  <vicki@apple.com>

        Reviewed by John. 

        * WebCore.order: Removed. We now point to the WebCore order file in /AppleInternal/OrderFiles.
        * WebCore.pbproj/project.pbxproj: change sectorder flag to point to /AppleInternal/OrderFiles/WebCore.order

2003-08-14  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

	Fix for this bug:

	<rdar://problem/3095893>: Image Capture: "Build web page" doesn't work with Japanese folder name.

        * kwq/KWQKURL.mm:
        (KURL::getNSURL): Try UTF-8 first and fallback to ISO Latin-1 when creating an NSURL.
	This will handle the two-byte character in file name case mentioned in the bug.

2003-08-14  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3375270 -- writing to frame parent from a button press crashes in viewportMousePressEvent
        
        The fix turned out to be to ref the view around handling events in the view, since processing
        the event could cause the view and part to go away. Since the view refs the part, ref'ing just
        the view seems to work perfectly.
        
        * kwq/KWQKHTMLPart.mm: Fixed namespace access to use "using" instead of explicit namespaces.
        (KWQKHTMLPart::setView): Not-entirely-related cleanup. Use the "ref before deref" idiom here.
        (KWQKHTMLPart::sendResizeEvent): Ref the KHTMLView while sending the resize event.
        (KWQKHTMLPart::mouseDown): Ref the KHTMLView while sending the viewport mouse down event.
        (KWQKHTMLPart::mouseDragged): Ref the KHTMLView while sending the viewport mouse dragged event.
        (KWQKHTMLPart::mouseUp): Ref the KHTMLView while sending the viewport mouse up or double click event.
        (KWQKHTMLPart::mouseMoved): Ref the KHTMLView while sending the viewport mouse moved event.

2003-08-13  David Hyatt  <hyatt@apple.com>

	Fix for 3372896, spaces left at ends of lines.  Patch the selection code
	to be smarter about detecting ends of lines and adding in spaces.
	
        Reviewed by gramps

        * khtml/khtml_part.cpp:
        (KHTMLPart::selectedText):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::attributedString):

2003-08-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken Kocienda.

	- fixed 3365242 - non-repro abort in HTMLTokenizer at ajc.com
	
        * khtml/khtml_part.cpp:
        (KHTMLPart::write): ref the part around actually processing the
	data, since a script could cause the part to go away.

2003-08-12  David Hyatt  <hyatt@apple.com>

	Fix for 3262190, <li> bullets in mail were overly massive.  The bezier path the
	painter stroked was not setting the line width from QPen's width, so it ended up
	just using the current line width instead (which happened to be much larger in
	Mail).
	
        Reviewed by darin

        * kwq/KWQPainter.mm:
        (QPainter::drawEllipse):
        (QPainter::drawArc):
        (QPainter::_drawPoints):

2003-08-12  John Sullivan  <sullivan@apple.com>

	- fixed 3370614 -- REGRESSION (81-85): partial inline input from Japanese 
	input method can disappear

        Reviewed by Hyatt

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::updateFromElement):
	call w->text() before element()->value(), because w->text() has a side
	effect of updating element()->value() in the inline input case
        (RenderTextArea::updateFromElement):
	same for text areas

2003-08-12  David Hyatt  <hyatt@apple.com>

	Fix for 3374566, list bullets don't display if list-style-type is none but a list-style-image
	is specified.  The spec says list-style-type: none does not apply to list-style-image,
	and this fixes Microsoft's list bullet on their security pages.
	
        Reviewed by john

        * khtml/rendering/render_list.cpp:
        (RenderListItem::setStyle):

2003-08-12  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3226083 -- REGRESSION (Panther): white box overlaying select lists at nvidia.com drivers page

        * kwq/KWQListBox.mm: (QListBox::QListBox): Call releaseGState on the clip view
        that we make for the list box. This prevents the incorrect graphics state caching
        that causes the problem, although it's not entirely clear why this is necessary.
        This may ultimately turn out to be an AppKit bug, and if so we can roll out this change
        when the AppKit itself is fixed.

2003-08-12  David Hyatt  <hyatt@apple.com>

	Fix for 3373462, XML shows up as blank because the root is inline.  The fix is
	to just disallow inline roots.
	
        Reviewed by kocienda

        * khtml/css/cssstyleselector.cpp:

2003-08-11  David Hyatt  <hyatt@apple.com>

	Fix for 3349142, blocks inside inlines with generated content cause the generated
	content to get all screwed up, especially if you try to print.  This patch fixes
	generated content to be continuation-aware (and vice versa), so that the content
	behaves correctly when inlines get split.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::updatePseudoChild):
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::addChild):
        * khtml/rendering/render_inline.cpp:
        (RenderInline::isInlineContinuation):
        (RenderInline::addChildToFlow):
        (RenderInline::cloneInline):
        (RenderInline::splitInlines):
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::continuation):
        (RenderObject::isInlineContinuation):
        * khtml/rendering/render_object.h:

2003-08-11  Darin Adler  <darin@apple.com>

        * kwq/KWQKHTMLPart.h: Fixed some small typo-ish strangenesses.

2003-08-08  David Hyatt  <hyatt@apple.com>

	Fix for 3368672, don't allow frames and framesets to be positioned or relpositioned.
	
        Reviewed by darin

        * ChangeLog:
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        * khtml/rendering/render_object.cpp:
        (RenderObject::requiresLayer):
        * khtml/rendering/render_object.h:

2003-08-07  David Hyatt  <hyatt@apple.com>

	Fix for 3368463, assert/crash on libraries.uc.edu page.  A stylesheet was making 
	a <p> a table-column, which is totally nonsensical.  Since this isn't supported in
	WinIE, it just got ignored.  The fix I chose matches what Mozilla does, which is
	to not allow table-column renderobjects to have children.

	Fix for 3364412, FM pro file that happens to use a <col> element crashes.  Make sure
	to patch bidiiterator to have a null check for this bizarre case.  Technically <col>
	should never have been a table-column, since it's not in the HTML namespace, but
	that fix will have to wait until we get @namespace support in CSS.
	
        Reviewed by john

        * ChangeLog:
	* khtml/rendering/bidi.cpp
        * khtml/rendering/render_table.cpp:
        (RenderTableCol::canHaveChildren):
        * khtml/rendering/render_table.h:

2003-08-05  Dave Hyatt  <hyatt@apple.com>

	Fix for 3370654.  Make sure the max width computation for blocks with inline children actually
	ignores non-pre text runs that consist entirely of whitespace.
	
        Reviewed by mjs

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_text.cpp:
        (RenderText::trimmedMinMaxWidth):
        * khtml/rendering/render_text.h:

2003-08-08  John Sullivan  <sullivan@apple.com>

	- fixed 3362481 -- REGRESSION (89-90): clicking in a field causes 
	page to move; esp. bad if the field moves out from under the mouse

        Reviewed by Darin

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::currentEventIsMouseDownInWidget):
	new method

        * kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView becomeFirstResponder]):
	only scroll to reveal if currentEventIsMouseDownInWidget is false

        * kwq/KWQTextField.mm:
        (-[KWQTextField setHasFocus:]):
	ditto

=== WebCore-92.1 ===

2003-08-07  Darin Adler  <darin@apple.com>

        Reviewed by John Sullivan.

        - fixed 3366234 -- repro crash in CSS parser: function that can't be parsed (www.bi-flugplatz-magdeburg.de)

        * khtml/css/parser.y: Allocate a Function object for the "can't parse function" case, since
        the other code involved cannot handle 0 for the function.
        * khtml/css/parser.cpp: Regenerated.

=== Safari-92 ===

2003-08-07  Ken Kocienda  <kocienda@apple.com>

       Reviewed by Darin

       Fix for this bug:

       <rdar://problem/3367434>: newly-added KURL assertion failing reproducibly for JavaScript URL (www.thai.com)

       The assertion is correct. The issue was in calling the function
       with bad input. Non-hierarchical URLs should not have their "path"
       elements submitted to a function that will replace dots.

       The fix is to avoid calling this function with such non-hierarchical
       URLs.

         * kwq/KWQKURL.mm:
         (KURL::parse)

2003-08-07  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej

	There was a bug in this code that caused a relative URL that was
	being resolved against an empty base URL to process incorrectly.
	The bug is that the resolution was being done twice. The first
	time was correct handling of this case, but then the code did
	not return at this point, and instead proceeded on through the
	code path that is used to handle resolution of a relative URL
	against a non-empty base. This double processing is clearly
	wrong, and we found this bug as the result of the recent addition 
	of an assertion in some related code.

        * kwq/KWQKURL.mm:
        (KURL::KURL)

2003-08-06  Darin Adler  <darin@apple.com>

        Reviewed by Richard.

        - fixed 3347114 -- remove vestiges of posing, including init routine, from WebKit

        * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyDown:]): Remove check for old
        versions of AppKit that let the WebKit posing handle key down events.
        * kwq/KWQTextField.mm: Removed fieldEditorDidMouseDown: methods.

        * WebCore.pbproj/project.pbxproj: Removed WebCoreFirstResponderChanges.h.
        * kwq/WebCoreFirstResponderChanges.h: Removed.

2003-08-06  Richard Williamson   <rjw@apple.com>

	Fixed development build problem.  WebCore.exp needed a newline at EOF.
	
        * WebCore-combined.exp:

2003-08-06  Richard Williamson   <rjw@apple.com>

	Fixed 3348630.  Pick up about 1% by moving implementation of _unicodeDirection to WebCore and inlining.

        Reviewed by Ken.

        * WebCore-combined.exp:
        * WebCore.exp:
        * WebCore.pbproj/project.pbxproj:
        * kwq/KWQString.h:
        * kwq/WebCoreUnicode.cpp:
        * kwq/WebCoreUnicode.h:

2003-08-06  John Sullivan  <sullivan@apple.com>

	- fixed 3366587 -- Mail quits instantly (no crashlog) trying
	to reply to a particular message

        Reviewed by Richard

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::attributedString):
	Return nil immediately if startNode is nil.

2003-08-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Chris Blumenberg.

	- fixed 3366173 - crash in DOM::DomShared::ref loading www.berkheiser.net
	
        * khtml/ecma/kjs_html.cpp:
        (Image::putValue): Check for NULL before refing, because we set
	onLoadListener with a function that returns NULL if passed a value
	that's not a function.

2003-08-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin and Dave.

	- fixed 3364433 - repro crash in khtml::RenderBlock::nodeAtPoint
	
        * khtml/rendering/render_object.cpp:
        (RenderObject::removeFromObjectLists): When finding the right
	parent block to remove a float from, don't stop at floating or
	positioned elements. They could well have floats in their
	m_floatingObjects list due to overhang, and failing to remove them
	leads to crashes.

2003-08-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

        * kwq/KWQPainter.mm:
        (QPainter::drawLine): Print a warning in debug builds when drawing
	a dashed line. Also, revert accidental commenting of lines that
	set the dash style.

2003-08-04  Dave Hyatt  <hyatt@apple.com>

	Fix for 3127909, copied text matched the document source instead of the
	rendered HTML.  This patch makes sure that the TextRuns are walked instead
	of just blindly pulling the text out of the DOM node.
	
        Reviewed by rjw

        * khtml/khtml_part.cpp:
        (KHTMLPart::selectedText):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::attributedString):

2003-08-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin and Dave.

	- fixed 3363557 - REGRESSION (90-91): float:left element inside position:absolute element positioned wrong

        * khtml/rendering/render_block.cpp:
        (RenderBlock::calcInlineMinMaxWidth): Remove attempt to break line
	after flaot that follows a non-float. Removing this code fixes the
	regression and leaves pepboys and the meyerweb matrix theme
	working properly. Also, I could not find any evidence in the CSS2
	spec that what this code is trying to do is right.

2003-08-05  Ken Kocienda  <kocienda@apple.com>

        Reviewed by John

        Fix for this bug:

        <rdar://problem/3364251>: Modify KURL to call improved NSURL creation API

        * kwq/KWQKURL.mm:
        (KURL::getNSURL): Modify to use CFURLCreateAbsoluteURLWithBytes to create
        the NSURL.

2003-08-05  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej

	In KWQKURL.mm, we copy the contents of a URL path from a source buffer
	to a destination buffer. In the loop, we often access dst[-1]. It was
	not entirely clear that this did not underrun the buffer. Upon further
	inspection, it seems clear that it does not, but this small change
	makes this more clear, and adds an assertion that all is well with
	regard to indexing into the dst buffer.

        * kwq/KWQKURL.mm:
        (copyPathRemovingDots)

2003-08-01  Richard Williamson   <rjw@apple.com>

	Fixed 3095376.  Implemented correct selection behavior for rtl scripts.
	We still use our Arabic and Hebrew layout scheme.

	Fixed 3360487.  Implemented selection of ATSU rendered code.

	Fixed 3360242.	Return nil from _bodyBackgroundColor when no 
	background color specified.  This was requested by Doug D.

        Reviewed by Maciej.

        * khtml/rendering/font.cpp:
        (Font::drawHighlightForText):
        * khtml/rendering/font.h:
        * khtml/rendering/render_text.cpp:
        (TextRun::paintSelection):
        * kwq/KWQFontMetrics.mm:
        (QFontMetrics::checkSelectionPoint):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::bodyBackgroundColor):
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::drawHighlightForText):
        * kwq/WebCoreTextRenderer.h:

2003-08-01  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3265419 - homepage preview doesn't show Images with names longer than 17 chars
	
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTML):

2003-08-01  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3339255 - REGRESSION (73-85): javascript failure at gia.apple.com

	I fixed this by making sure to cancel any pending redirects before
	telling the bridge to load a URL. We don't want a race between
	getting back a response and the redirect timer.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge provisionalLoadStarted]): New method - call equivalent part method.
	We count on the other side of the bridge to call this once it knows a load will
	really happen (not cancelled by policy, etc).
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::provisionalLoadStarted): cancel pending redirects.

=== Safari-91 ===

2003-07-31  Dave Hyatt  <hyatt@apple.com>

	Fix for 3347286, hang on pepboys.com.  Text-indent had numerous bugs that
	resulted in an infinite loop because some incorrect values were being compared.
	This patch changes floats to ignore text-indent when positioning themselves
	(as they should).

	The maxwidth computation also didn't deal properly with text-indent, applying it
	multiple times instead of once, and also only applying it for text and not for
	inline replaced elements (images, form controls, etc.).

	With these changes pepboys.com renders correctly.  This patch also conveniently fixes
	the last rendering error on meyerweb's Matrix stylesheet.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:

2003-07-31  Richard Williamson   <rjw@apple.com>

	Fixed 3359152.  SPI to get the background color for a frame.

        Reviewed by hyatt.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::bodyBackgroundColor):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge bodyBackgroundColor]):

2003-07-31  Dave Hyatt  <hyatt@apple.com>

	Fix for "The Matrix" stylesheet on meyerweb.com and for 26(!) of the
	layout tests.  Basically when laying out a line, you have a beginning, and end,
	and midpoints in between that tell you what whitespace to skip over.  It was
	possible to end up with the last midpoint being a start point that was past the
	end of the line, and in that case, we would sometimes not strip off the trailing
	space at the end of the line like we should.

	This patch adds a simple function to check for this condition.  It strips off the
	out-of-bounds midpoint, and then shaves off the trailing space from the previous
	midpoint if it's necessary to do so.

	Also fix the way spaces are counted so that we don't add in spaces for text that 
	is not part of any bidi runs.
	
        Reviewed by john

        * khtml/rendering/bidi.cpp:

2003-07-30  Richard Williamson   <rjw@apple.com>

	Preparation for 3095376.

        Reviewed by Maciej.

        * WebCore-combined.exp:
        * WebCore.exp:
        * khtml/rendering/font.cpp:
        (Font::checkSelectionPoint):
        * khtml/rendering/font.h:
        * khtml/rendering/render_text.cpp:
        (TextRun::checkSelectionPoint):
        * kwq/KWQFontMetrics.h:
        * kwq/KWQFontMetrics.mm:
        (QFontMetrics::width):
        (QFontMetrics::floatWidth):
        (QFontMetrics::floatCharacterWidths):
        (QFontMetrics::checkSelectionPoint):
        * kwq/KWQPainter.mm:
        (QPainter::drawText):
        * kwq/WebCoreTextRenderer.h:
        * kwq/WebCoreTextRendererFactory.m:
        (WebCoreInitializeTextRun):
        (WebCoreInitializeEmptyTextStyle):

2003-07-30  Dave Hyatt  <hyatt@apple.com>

	Fix for 3274144, floats in Help Viewer overlapped when they shouldn't have.
	lineWidth was overflowing (and positionNewFloats was also sometimes not called
	when it should have been).
	
        Reviewed by darin

        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:

2003-07-30  Dave Hyatt  <hyatt@apple.com>

	Add support for setting the text-shadow's color.  This uses a new CG API,
	so updating to a fairly recent Panther is required.
	
        Reviewed by rjw

        * khtml/css/cssparser.cpp:
        (CSSParser::parseShadow):
	* kwq/KWQPainter.mm:
        (QPainter::setShadow):

2003-07-30  John Sullivan  <sullivan@apple.com>

	- fixed 3346460 -- images > area (2048x2048) are compressed vertically 
	when displayed as src of img tag

        Reviewed by Darin

        * khtml/rendering/render_image.cpp:
        (RenderImage::layout):
	Just comment out the code that imposes a maximum image size (incorrectly);
	maybe KDE folks want to make this work, but we don't need to try to
	prevent large images.

2003-07-30  John Sullivan  <sullivan@apple.com>

	- WebCore part of fix for 3284525 -- AutoFill fills in 
	only e-mail address field of New Account form on Apple Store Japan

	There were two problems: the regex library being used by
	KWQRegExp.mm didn't handle unicode at all, and the way we
	were using word boundaries in our regular expressions didn't
	work with Japanese.

        Reviewed by Darin

        * kwq/KWQKHTMLPart.mm:
        (regExpForLabels):
	Redid the way word boundaries are used; the old way didn't
	work with PCRE, and also didn't work with Japanese. 

        * kwq/KWQRegExp.h:
	removed treatStartAsStartOfInput parameter to match() that Trey had added; 
	it was being used incorrectly and was not necessary.

        * kwq/KWQRegExp.mm:
        (compareStringOffsets), (createSortedOffsetsArray),
        (convertCharacterOffsetsToUTF8ByteOffsets),
        (convertUTF8ByteOffsetsToCharacterOffsets):
	Code copied from JavaScriptCore/regexp.cpp to convert between
	byte and character offsets. Darin preferred that I copy these
	methods rather than make them public in JavaScriptCore/regexp.h.
        (QRegExp::KWQRegExpPrivate::compile):
	converted from regex.h style to pcre.h style 
        (QRegExp::KWQRegExpPrivate::~KWQRegExpPrivate):
	ditto
        (QRegExp::match):
	ditto
        (QRegExp::search):
	removed parameter to match()
        (QRegExp::searchRev):
	ditto

        * kwq/KWQString.mm:
        (QString::replace):
	removed parameter to match()

2003-07-30  Richard Williamson   <rjw@apple.com>

	Fixed 3349598.  Deal gracefully with <li> items that
	are not in a <ol> or <ul>, instead of crashing!

        Reviewed by Ken.

        * kwq/KWQKHTMLPart.mm:
        (listParent):
        (KWQKHTMLPart::attributedString):

2003-07-29  Richard Williamson   <rjw@apple.com>

	Use the new KURL getNSURL() method to create an NSURL.

        Reviewed by darin.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::attributedString):

2003-07-29  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3311756 -- REGRESSION (76-77): radio buttons in different forms act as the same set
	by rolling out old fix for 3158411 -- radio button groups are supposed to be per-form
        The real bug at flyglobespan.com is what's fixed below.

        * khtml/html/html_formimpl.h:
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::radioClicked):
        (HTMLInputElementImpl::~HTMLInputElementImpl):
        (HTMLInputElementImpl::setType):
        (HTMLInputElementImpl::parseAttribute):
        (HTMLInputElementImpl::attach):
        (HTMLInputElementImpl::reset):
        (HTMLInputElementImpl::setChecked):
        (HTMLInputElementImpl::isEditable):
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:

        - fixed 3158411 -- re-opened form is one form in other browsers, multiple forms in Safari
        (flyglobespan.com)

        * khtml/html/htmlparser.cpp: (KHTMLParser::getElement): Don't open a form if we encounter
        a form element inside another form.

2003-07-29  John Sullivan  <sullivan@apple.com>

	- fixed 3346707 -- AutoFill does not fill in email address on 
	Apple Store new account page

        Reviewed by Darin

        * kwq/KWQRegExp.h:
        * kwq/KWQRegExp.mm:
        (QRegExp::searchRev):
	This method (that Trey had added) used a placeholder 2nd parameter
	that was always -1 and should have been ignored. But it was
	being passed into QRegExp::match as the starting index, which
	happened to work in many cases, but not if the byte of memory
	before the string happened to be a null character. Fixed by
	eliminating the placeholder parameter entirely.

2003-07-28  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- fixed 3343050 - nil-deref in saveInterpreterBuiltins running Sherlock via MallocDebug in Panther7B20
	- fixed 3343942 - Safari crashes when clicking on link w/ JavaScript turned off
	
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::saveInterpreterBuiltins): Don't attempt to save
	when JavaScript is off.
        (KWQKHTMLPart::restoreInterpreterBuiltins): Don't attempt to restore
	when JavaScript is off.
        (KWQKHTMLPart::saveWindowProperties): Remove ERROR, since that
	case is normal when JS is off.
        (KWQKHTMLPart::saveLocationProperties): Remove ERROR, since that
	case is normal when JS is off.
        (KWQKHTMLPart::restoreWindowProperties): Remove ERROR, since that
	case is normal when JS is off.
        (KWQKHTMLPart::restoreLocationProperties): Remove ERROR, since that
	case is normal when JS is off.

2003-07-28  Dave Hyatt  <hyatt@apple.com>

	Fix build bustage on my buggy panther compiler.
	
        Reviewed by darin

        * kwq/KWQLineEdit.mm:
        (QLineEdit::~QLineEdit):

2003-07-28  Dave Hyatt  <hyatt@apple.com>

	Fix for 3343250, XML didn't know how to make implicit tbodies when starting new elements,
	nor did it know to skip implicit elements when popping its element stack.
	
        Reviewed by darin

        * khtml/xml/xml_tokenizer.cpp:
        (XMLHandler::startElement):
        (XMLHandler::endElement):

2003-07-25  Dave Hyatt  <hyatt@apple.com>

	Rename box and inline-box to -khtml-box and -khtml-inline-box.
	
        Reviewed by john

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:

2003-07-25  Dave Hyatt  <hyatt@apple.com>

	Fix for 3343529, inline blocks crashing Safari.  There were lots of problems with
	inlne-blocks.  This code gets basic inline-blocks working properly (with no crashes).

	Several functions have been patched to take an isRootLineBox parameter.  This is used
	to tell whether you're supposed to examine the root line box for a block or the block
	itself.  In the case of baselinePosition and lineHeight, it indicates whether the caller
	wants to measure the outside or inside of the box.  

	The outside of an inline-block is like a replaced element (e.g., an image), but the 
	inside is like a block, e.g., you want measurements for
	the line height and baseline position of a root line box for that block.

	Similarly, createInlineBox has been patched in order to know whether you're making a
	root inline box *inside* the inline-block or an inline box that *encompasses* the
	inline-block element (like you'd do for an image).

	A number of places had isInline() calls and needed to be patched to also check
	isInlineBlockOrInlineTable().  How to treat the inline-block again basically depends
	on whether the caller is looking at the outside of the block (in which case you're like
	an inline replaced element) or the inside of the block (in which case you're just like
	a block).
	
        Reviewed by darin

        * ChangeLog:
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidth):
        (RenderBox::calcHeight):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::createInlineBox):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_form.cpp:
        (RenderFormElement::baselinePosition):
        (RenderButton::baselinePosition):
        (RenderSubmitButton::baselinePosition):
        (RenderSelect::baselinePosition):
        * khtml/rendering/render_form.h:
        * khtml/rendering/render_line.cpp:
        (InlineFlowBox::verticallyAlignBoxes):
        (InlineFlowBox::computeLogicalBoxHeights):
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::lineHeight):
        (RenderListMarker::baselinePosition):
        * khtml/rendering/render_list.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::sizesToMaxWidth):
        (RenderObject::getVerticalPosition):
        (RenderObject::lineHeight):
        (RenderObject::baselinePosition):
        (RenderObject::createInlineBox):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::lineHeight):
        (RenderReplaced::baselinePosition):
        * khtml/rendering/render_replaced.h:
        * khtml/rendering/render_table.cpp:
        * khtml/rendering/render_table.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::lineHeight):
        (RenderText::baselinePosition):
        (RenderText::createInlineBox):
        * khtml/rendering/render_text.h:

2003-07-25  Dave Hyatt  <hyatt@apple.com>

	Fix for 3343527, crash when attempting to access rules in the CSS OM.
	Our KWQListImpl doesn't null check accesses, so anything out
	of bounds would cause a crash.
	
        Reviewed by mjs

        * kwq/KWQListImpl.mm:
        (KWQListImpl::at):

2003-07-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	 - fixed 3332460 - nil-deref in khtml::RenderWidget::eventFilter with onchange handler

        * khtml/rendering/render_form.cpp:
        (RenderTextArea::handleFocusOut): Check if we still have an
	element. It could have gone away while handling an event that
	replaced some or all of the document, and if we're gonna be
	destroyed soon then there's no point doing this work anyway.

2003-07-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 3332460 - nil-deref in khtml::RenderWidget::eventFilter with onchange handler
	
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::eventFilter): We want to ref element() across this call, but it could get
	unset, so store it in a local variable.
        * kwq/KWQLineEdit.h:
        * kwq/KWQLineEdit.mm:
        (QLineEdit::~QLineEdit): invalidate our KWQTextField.
        * kwq/KWQTextField.h:
        * kwq/KWQTextField.mm:
        (-[KWQTextField invalidate]): Set widget to NULL.
        (-[KWQTextField action:]): Do nothing if widget is NULL.
        (-[KWQTextField controlTextDidBeginEditing:]): Likewise.
        (-[KWQTextField controlTextDidEndEditing:]): Likewise.
        (-[KWQTextField controlTextDidChange:]): Likewise.
        (-[KWQTextField control:textShouldBeginEditing:]): Likewise.
        (-[KWQTextField control:textShouldEndEditing:]): Likewise.
        (-[KWQTextField control:didFailToFormatString:errorDescription:]): Likewise.
        (-[KWQTextField control:didFailToValidatePartialString:errorDescription:]): Likewise.
        (-[KWQTextField control:isValidObject:]): Likewise.
        (-[KWQTextField control:textView:doCommandBySelector:]): Likewise.
        (-[KWQTextField stringValue]): Likewise.
        (-[KWQTextField setStringValue:]): Likewise.
        (-[KWQTextField setFont:]): Likewise.
        (-[KWQTextField nextKeyView]): Likewise.
        (-[KWQTextField previousKeyView]): Likewise.
        (-[KWQTextField nextValidKeyView]): Likewise.
        (-[KWQTextField previousValidKeyView]): Likewise.
        (-[KWQTextField fieldEditorDidMouseDown:]): Likewise.
        (-[KWQTextField textView:shouldHandleEvent:]): Likewise.
        (-[KWQTextField textView:didHandleEvent:]): Likewise.
        (-[KWQTextField setHasFocus:]): Likewise.

2003-07-24  John Sullivan  <sullivan@apple.com>

	- fixed 3332622 -- Safari Abbreviates Attribute Names in EMBED tags

        Reviewed by Richard

        * khtml/html/htmltokenizer.h:
	bumped fixed max length of attributes from 14 to 1024.
	Theoretically they could be any arbitrary length, but it's
	more risk than it's worth to rewrite the code that uses the
	fixed-size buffer that is based on this value.

2003-07-24  Dave Hyatt  <hyatt@apple.com>

	Change all uses of "konq-" in CSS to "khtml-".  

	Also rename the CSS3 properties that have either buggy or 
	incomplete implementations to "-khtml-property" for forward
	compatibility (so that people don't have to worry about a buggy
	Safari if/when they use the official property names).
	
        Reviewed by john

        * khtml/css/cssparser.cpp:
        (CSSParser::parseRule):
        (CSSParser::parseValue):
        (CSSParser::parseDeclaration):
        (CSSParser::parseFontFamily):
        (CSSParser::parseShadow):
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/css/html4.css:
        * khtml/css/parser.cpp:
        * khtml/css/parser.h:
        * khtml/css/parser.y:
        * khtml/css/quirks.css:
        * khtml/css/tokenizer.cpp:
        * khtml/css/tokenizer.flex:
        * khtml/html/html_blockimpl.cpp:
        (HTMLDivElementImpl::parseAttribute):
        (HTMLParagraphElementImpl::parseAttribute):
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::addHTMLAlignment):
        * khtml/html/html_inlineimpl.cpp:
        (HTMLFontElementImpl::parseAttribute):
        * khtml/html/html_tableimpl.cpp:
        (HTMLTablePartElementImpl::parseAttribute):
        (HTMLTableCellElementImpl::parseAttribute):
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcHorizontalMargins):
        * khtml/rendering/render_flexbox.cpp:
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_table.cpp:
        (RenderTableCell::setStyle):

=== Safari-90 ===

2003-07-23  Dave Hyatt  <hyatt@apple.com>

	Fix opacity to respect clipping.
	
        Reviewed by rjw

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):

2003-07-23  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 2/3 of 3279864 -- remove class_poseAs calls from WebKit (will also remove init routine)

        * kwq/KWQTextArea.h: Add drawing state variable so we can tell the difference
        between calls to draw the insertion point inside and calls to draw outside the
        redraw machinery.
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea displayRectIgnoringOpacity:]): Added. Set drawing flag while in here.
        This is the method used by KWQWidget to draw.
        (-[KWQTextArea textView:shouldDrawInsertionPointInRect:color:turnedOn:]): Added.
        Calls setNeedsDisplay (the NSView version, not the NSTextView override) instead
        of immediately drawing when asked to draw outside the normal redraw machinery.
        (-[KWQTextAreaTextView keyDown:]): Call interceptKeyEvent before handling each
        key down event.
        * kwq/KWQTextField.h: Add drawing state variable so we can tell the difference
        between calls to draw the insertion point inside and calls to draw outside the
        redraw machinery.
        * kwq/KWQTextField.mm:
        (-[KWQTextField displayRectIgnoringOpacity:]): Added. Set drawing flag while in here.
        This is the method used by KWQWidget to draw.
        (-[KWQTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]): Added.
        Calls setNeedsDisplay (the NSView version, not the NSTextView override) instead
        of immediately drawing when asked to draw outside the normal redraw machinery.
        (-[KWQTextField textView:shouldHandleEvent:]): Call interceptKeyEvent before
        handling each key down event.
        (-[KWQTextField textView:didHandleEvent:]): Call fieldEditorDidMouseDown: after
        handling each mouse down event.

        * kwq/KWQWidget.mm: (QWidget::paint): Add comment about dependency on
        displayRectIgnoringOpacity: use in KWQTextArea and KWQTextField.

        * kwq/WebCoreFirstResponderChanges.h: Added a comment about obsolescence.

        - Xcode wanted to change this, because it now knows JavaScriptCore is a framework

        * WebCore.pbproj/project.pbxproj: Munged by Xcode.

2003-07-23  Dave Hyatt  <hyatt@apple.com>

	Fix for 3340885, invalid colors were being mapped to transparentColor,
	thus causing invisible text!
	
        Reviewed by kocienda

        * khtml/css/cssparser.cpp:
        (CSSParser::parseColorFromValue):

2003-07-23  Richard Williamson   <rjw@apple.com>

	Fixed for 3259840.  Use ATSU for scripts we don't handle internally,
	i.e.:  Syriac, Thaana, Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar, Hangul Jamo, Khmer, Mongolian

	Also fixed issues with our rendering of Arabic.

	Changed the internal API to take WebCoreTextRun and WebCoreTextStyle
	parameters instead of scads on individual parameters.  Much cleaner.

        Reviewed by Maciej.

        * WebCore-combined.exp:
        * WebCore.exp:
        * kwq/KWQFontMetrics.mm:
        (QFontMetrics::width):
        (QFontMetrics::floatWidth):
        (QFontMetrics::floatCharacterWidths):
        * kwq/KWQPainter.mm:
        (QPainter::drawText):
        * kwq/WebCoreTextRenderer.h:
        * kwq/WebCoreTextRendererFactory.m:
        (WebCoreMakeTextRun):
        (WebCoreMakeEmptyTextStyle):

2003-07-23  Dave Hyatt  <hyatt@apple.com>

	Clean up the mess left by a couple of previous checkins.  I had
	patched computeLength and computeLengthFloat to take a CSSStyleSelector,
	but then I came up with a simpler solution that didn't require that
	the selector be passed in as an argument.  I forgot, however, to revert
	the functions back to their original forms.  This patch does that.
	
        Reviewed by john

        * khtml/css/css_valueimpl.cpp:
        (CSSPrimitiveValueImpl::computeLength):
        (CSSPrimitiveValueImpl::computeLengthFloat):
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssstyleselector.cpp:

2003-07-23  Dave Hyatt  <hyatt@apple.com>

	Temporary hack to ensure that the layout tests will not all
	be failures if/when the layout tests regression gets fixed.
	Will remove once we can run the tests.
	
        Reviewed by ken

        * khtml/rendering/render_block.cpp:

2003-07-22  Dave Hyatt  <hyatt@apple.com>

	Allow HTML and BODY to be any display type.  This patch primarily eliminates the
	RenderBody class and makes the code that deals with background propagation smart
	enough to locate the correct renderers for the HTML and BODY elements (by crossing
	back into the DOM tree).
	
        Reviewed by darin

        * ForwardingHeaders/rendering/render_body.h: Removed.
        * WebCore.pbproj/project.pbxproj:
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::insertedIntoDocument):
        * khtml/html/html_baseimpl.h:
        * khtml/rendering/render_body.cpp: Removed.
        * khtml/rendering/render_body.h: Removed.
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        (RenderBox::paintRootBoxDecorations):
        (RenderBox::paintBoxDecorations):
        (RenderBox::repaint):
        * khtml/rendering/render_inline.cpp:
        (RenderInline::paintObject):
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::isBody):
        * khtml/rendering/render_object.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::createRenderer):

2003-07-22  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3108604 -- add Shift JIS X0213 and HK-SCS to the Text Encoding menu

        * kwq/mac-encodings.txt: Added "Shift_JIS_X0213-2000". Changed all non-HKSCS
        Big5 encodings to use the DOS variant of Big5 as requested by Peter Edberg,
        but left Big5-HKSCS alone.
        * kwq/KWQCharsets.mm: Added kCFStringEncodingBig5_DOSVariant constant.
        * kwq/KWQCharsetData.c: Regenerated.

        - fixed 3100151 -- subframes without explicit charset settings should inherit from parent, not use default

        * khtml/khtml_part.cpp: (KHTMLPart::write): Get the default encoding from the parent
        part, if there is one.

2003-07-22  Dave Hyatt  <hyatt@apple.com>

	Fix for 3293898, list bullets in ordered lists with an inside list
	position were rendering as though they had a width of 0.  This was
	a bug in KWQFontMetrics, which needed to handle the case where a
	length of -1 was passed in to the width method (in which case
	you should use the length of the whole string).
	
        Reviewed by john

        * kwq/KWQFontMetrics.mm:
        (QFontMetrics::width):

2003-07-22  Dave Hyatt  <hyatt@apple.com>

	Fix for mozilla.org front page.  This patch re-architects 
	align="left" and align="right" (for rtl and ltr directionality
	respectively).  The attributes are mapped to custom text-align
	values, konq-left and konq-right, just as was done with the
	center/middle attributes for alignment.

	A number of "hack" style rules have been dropped from html4.css
	and replaced with this C++ code that now works in the general
	case for any children of align="left/right" divs and tds.

	In addition, absmiddle support has been added for <td>s.

	For RTL blocks, there is also a regression fix (this was probably
	the #1 culprit for mangled placement of blocks in Hebrew Web
	pages).  The old code was doing byzantine math that happened to
	work out.  When I tried to simplify it before 1.0, I missed a spot
	and basically broke margin handling on RTL blocks completely.
	
        Reviewed by mjs

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/css/html4.css:
        * khtml/html/html_blockimpl.cpp:
        (HTMLDivElementImpl::parseAttribute):
        (HTMLParagraphElementImpl::parseAttribute):
        * khtml/html/html_tableimpl.cpp:
        (HTMLTablePartElementImpl::parseAttribute):
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcHorizontalMargins):
        * khtml/rendering/render_style.h:

2003-07-21  Dave Hyatt  <hyatt@apple.com>

	Fix for 3333557, crash on www.dremedia.com.  markDescendants in RenderBlock
	was not passing in its argument in the recursive step, so the float wasn't
	getting properly cleared out of everyone's lists.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:

2003-07-21  Dave Hyatt  <hyatt@apple.com>

	Fix for 3182596, percentage height tables with cells that specify
	tiny percentage heights used that height even if it was smaller
	than the cell's minimum required height.
	
        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTableSection::layoutRows):

2003-07-21  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3316867 -- tabbing to textarea below visible part of page doesn't scroll down

        * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]): Added call to
        _KWQ_scrollFrameToVisible to match the one in KWQTextField.

2003-07-21  Dave Hyatt  <hyatt@apple.com>

	Fix removeAttributeNode.  This is David Faure's patch.
	
        Reviewed by me

        * khtml/xml/dom_elementimpl.cpp:
        (NamedAttrMapImpl::removeAttribute):

2003-07-21  Dave Hyatt  <hyatt@apple.com>

	Checking in David Faure's patch that fixes getElementsByTagName(*).
	
        Reviewed by me

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::getElementsByTagNameNS):
        (TagNodeListImpl::nodeMatches):

2003-07-18  Dave Hyatt  <hyatt@apple.com>

	Enable domain() and setDomain() to work for all documents (XML
	as well as HTML).

	Implement onload for frames.
	
        Reviewed by mjs

        * khtml/ecma/kjs_window.cpp:
        (Window::isSafeScript):
        (WindowFunc::tryCall):
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::parseAttribute):
        (HTMLIFrameElementImpl::parseAttribute):
        * khtml/html/html_documentimpl.cpp:
        * khtml/html/html_documentimpl.h:
        * khtml/khtml_part.cpp:
        (KHTMLPart::checkEmitLoadEvent):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::domain):
        (DocumentImpl::setDomain):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::dispatchWindowEvent):

2003-07-18  Dave Hyatt  <hyatt@apple.com>

	Fix for 3334082, XML documents can access HTML/XML docs in other
	domains.  The basic bug is that we made a change right before
	1.0 to allow a parent document to access a child frame's document
	if the child frame had no document.  What we didn't notice was
	that the ptr was obtained from the part by asking for an HTML
	document.  For XML documents that failed the cast, we got back
	null as well, which means that for non-HTML XML documents we
	always return true from isSafeScript.

	This patch makes sure our addition uses the raw xmlDoc pointer,
	so that there are no mistakes, and it restores the code that
	denies access when you aren't an HTML document.

	(It is a separate bug that we just disallow cross-frame
	communication in XML documents right now that I'll file as
	a follow-up to this one.)
	
        Reviewed by darin, rjw, mjs

        * khtml/ecma/kjs_window.cpp:
        (Window::isSafeScript):

2003-07-15  Dave Hyatt  <hyatt@apple.com>

	Fix for 3300362, crash on myuhc.com.  The residual style code
	was messing up and inserting nodes in the wrong place (and also
	updating the current member variable when it wasn't supposed to).

	Fix for 3331793, nil deref because (astoundingly) someone was
	using text-shadow and exposed a bug with the color handling
	of the shadow.
	
        Reviewed by darin

        * khtml/html/htmlparser.cpp:
	* khtml/html/htmlparser.h
        (KHTMLParser::reopenResidualStyleTags):
        (KHTMLParser::popBlock):

2003-07-17  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3283076 - crash when doing 2nd query on the eBay channel (Sherlock) -- JavaScript locking issue?

	I added a bit of minimal extra locking to WebCore to make sure
	multithreaded apps that use WebKit on the main thread but do
	JavaScript on other threads as well continue to work nicely.

        * khtml/ecma/kjs_proxy.cpp:
        (KJSProxyImpl::initScript): Lock interpreter around possible allocations or collections.
        * khtml/ecma/kjs_window.cpp:
        (Window::clear): Lock interpreter around possible allocations or collections.

2003-07-17  Ken Kocienda  <kocienda@apple.com>

        Reviewed by John

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::createPart): Now uses NSURL instead of NSString
        (KWQKHTMLPart::redirectionTimerStartedOrStopped): Ditto
        (KWQKHTMLPart::userAgent): Ditto
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::setIconURL): Ditto
        (KHTMLPartBrowserExtension::setTypedIconURL): Ditto
        * kwq/KWQKJavaAppletWidget.mm:
        (KJavaAppletWidget::showApplet): Ditto
        * kwq/KWQLoader.mm:
        (KWQServeRequest): Ditto
        (KWQCheckCacheObjectStatus): Ditto
        * kwq/WebCoreBridge.h: Changed quite a number of methods to use NSURL 
	instead of NSString
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge didNotOpenURL:]): Now uses NSURL instead of NSString
        (-[WebCoreBridge scrollToAnchorWithURL:]): Ditto
        (-[WebCoreBridge URL]): Ditto

2003-07-17  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

        * kwq/KWQKHTMLPart.h: _submittedFormURL is now a KURL, not a QString
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURL): Now uses NSURL in API instead of NSString
        (KWQKHTMLPart::openURLRequest): Ditto
        (KWQKHTMLPart::didNotOpenURL): Ditto
        (KWQKHTMLPart::submitForm): Ditto. Plus update _submittedFormURL usages.
        (KWQKHTMLPart::urlSelected): Ditto
        (KWQKHTMLPart::setView): Ditto
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow): Now uses NSURL in API instead of NSString
        * kwq/KWQKURL.h: Added constructor that takes an NSURL
        * kwq/KWQKURL.mm:
        (KURL::KURL): Ditto.
        * kwq/WebCoreBridge.h: Updated bridge APIs to use NSURL instead of NSString
	in several places.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Ditto

2003-07-16  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - cure problem where we keep competing to check in config.h with/without HAVE_FOUNDATION_SOURCSE

        * Makefile.am: Remove the HAVE_FOUNDATION_SOURCES line.
        * config.h: Check in without that line.

2003-07-16  Vicki Murley  <vicki@apple.com>

        Reviewed by kocienda. 

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::attributedString): set linkStartLocation to zero to fix deployment build 

2003-07-15  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Richard
	
        * kwq/KWQKURL.h:
        * kwq/KWQKURL.mm:
        (StringHasCaseInsensitivePrefix): Helper method for the new functions below
        (StringByAddingPercentEscapes): Ditto
        (URLStringByAddingPercentEscapes): Ditto
        (KURL::getNSURL): Added convenience function to get an NSURL from a KURL
        (KURL::getNSData): Added convenience function to get an NSData from a KURL

2003-07-15  Richard Williamson   <rjw@apple.com>

	Fixed 3315951:  Add support for <OL>, <UL> in attributed string conversion.
	Fixed 3315952:  Add support for <IMG> in attributed string conversion.
	Fixed 3315953:  Added support for <A> in attributed string conversion.	

        Reviewed by John (and earlier by Darin).

        * khtml/rendering/render_list.h:
        * kwq/KWQKHTMLPart.mm:
        (fileWrapperForElement):
        (listParent):
        (inList):
        (KWQKHTMLPart::attributedString):

2003-07-14  Dave Hyatt  <hyatt@apple.com>

	Fix a problem where ems used for non-font values like width
	and line-height would not zoom. (r=darin)

	The rest is r=rjw.
	
	An implementation of the CSS2 text-shadow property. 

	It uses a CoreGraphics API for drawing shadows 
	(via a custom API on QPainter) to paint the shadows.

        At the moment there are two limitations in CG's API.  The first
        is that the shadow color cannot be set.  This will be fixed for
        Panther, and the code passes the color through in preparation
        for this fix.

	The second limitation is that CG only supports one shadow effect
	and not multiple shadow effects.  The parsing code on the CSS
        side is set up to go ahead and parse all of the shadow effects,
        but the code that makes use of shadows will simply look at the
        first one for now.  CG will not support multiple shadow effects
        in the Panther time frame, so it will be a while before this
        is revisited.

	This patch also fixes a slew of bugs with colors in KHTML.  When
	we took the CSS parser and all of its associated code from Lars,
	that code was using QRgb values that assumed RGBA (like the current
	Qt toolkit uses).  The code even made use of an "invalid color"
	that wasn't really invalid (kind of like the z-index hack we refused
	to take, i.e., unlikely but not invalid).

	Our KWQColor implementation has been rewritten in this patch to
	work the way the current Qt toolkit expects.  That is, the top
	eight bits actually do contain an alpha channel, and you can obtain
	the alpha component using the qAlpha method and build a quadruple
	using the qRgba method.

	This patch adds support for rgba quadruples to CSS, so you can now
	say, e.g.,color: rgba(255,0,0,0.5); in CSS.
	
        * khtml/css/css_valueimpl.cpp:
        (ShadowValueImpl::~ShadowValueImpl):
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        (parseColor):
        (CSSParser::parseColor):
        (CSSParser::parseColorFromValue):
        (CSSParser::parseShadow):
        * khtml/css/cssparser.h:
        * khtml/css/cssstyleselector.cpp:
        * khtml/misc/helper.h:
        * khtml/rendering/render_line.cpp:
        (InlineFlowBox::paintDecorations):
        * khtml/rendering/render_style.cpp:
        (StyleVisualData::StyleVisualData):
        (opacity):
        (flexibleBox):
        (StyleCSS3NonInheritedData::operator==):
        (textShadow):
        (StyleCSS3InheritedData):
        (StyleCSS3InheritedData::operator==):
        (StyleCSS3InheritedData::shadowDataEquivalent):
        (RenderStyle::RenderStyle):
        (RenderStyle::inheritFrom):
        (RenderStyle::operator==):
        (RenderStyle::inheritedNotEqual):
        (RenderStyle::diff):
        (ContentData::clearContent):
        (RenderStyle::setTextShadow):
        (ShadowData::operator==):
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::paintObject):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::diff):
        * kwq/KWQColor.h:
        * kwq/KWQColor.mm:
        (qRgb):
        (qRgba):
        (qAlpha):
        (QColor::QColor):
        (QColor::setNamedColor):
        (QColor::getNSColor):
        * kwq/KWQNamespace.h:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::drawRect):
        (QPainter::drawLine):
        (QPainter::_fillRect):
        (QPainter::fillRect):
        (QPainter::setShadow):
        (QPainter::clearShadow):

2003-07-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3244447 -- add KOI8-U charset support
        - fixed 3327152 -- unicodeFFFE and unicodeFEFF are handled backwards by WebCore
        - fixed 3327157 -- x-mac-ukrainian should be mapped to MacCyrillic
        - fixed 3327160 -- shift-jis, shift_jis, x-sjis should be mapped to the DOS variant of Shift JIS
        - fixed 3327162 -- most Simplified Chinese encoding choices should be mapped to the DOS variant of EUC-CN
        - fixed 3327166 -- use DOS variant of EUC_KR

        * kwq/KWQCharsets.mm: Added some defines so we could use encodings that don't
        have any kCFStringEncoding constant in a header file.
        * kwq/mac-encodings.txt: Change table entries in accordance with the above bug reports.
        * kwq/KWQCharsetData.c: Regenerated.

        - other changes, inspired by investigation of various bugs

        * kwq/KWQButton.mm: (-[KWQButton sendConsumedMouseUpIfNeeded]): Make robust against cases where
        sending the consumed mouse up event destroys the QButton.

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::reopenResidualStyleTags): Rearrange code slightly for clarity, added comment.
        (KHTMLParser::freeBlock): Removed unnecessary line of code.

2003-07-14  Dave Hyatt  <hyatt@apple.com>

	Fix for 3294626, no scrollbar on ESPN.  Fix lowestPosition to
	always crawl into all children.
	
        Reviewed by darin

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::lowestPosition):
        (RenderFlow::rightmostPosition):

2003-07-11  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3132021 -- certain Japanese characters are misrendered because of incorrect partial-character handling

        We didn't have code to handle kTECPartialCharErr.

        * kwq/KWQTextCodec.mm:
        (KWQTextDecoder::createTECConverter): Added. Broken out from convertUsingTEC.
        (KWQTextDecoder::appendOmittingBOMs): Added. Broken out from convertUsingTEC.
        (KWQTextDecoder::convertOneChunkUsingTEC): Added. Broken out from convertUsingTEC.
        This also has much of the partially-decoded character handling.
        (KWQTextDecoder::convertUsingTEC): Simplified by breaking into functions, and added
        handling to use the same buffer we use for the other decoders to hold partially-decoded
        characters.
        (KWQTextDecoder::convert): Add a partial-character handling test mode where the decoder
        is passed only a single byte at a time; controlled by an #if.

2003-07-11  Dave Hyatt  <hyatt@apple.com>

	Fix for 3187101, before/after content not dynamic.  This patch
	compares the ContentData of the old style and the new style and
	if they are different, it blows away and recreates the render
	objects for the generated content.  Otherwise it will dynamically
	update the styles of the generated content render objects (which
	should fix the printer/screen bug for rjw).

	Note that createObject had an extra call to setStyle, which was
	causing most objects to set the same style context on themselves
	twice.  This was exposed as I was fixing the above problem.
	
        Reviewed by darin

        * ChangeLog:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::updatePseudoChild):
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        * khtml/rendering/render_style.cpp:
        (RenderStyle::contentDataEquivalent):
        * khtml/rendering/render_style.h:

2003-07-11  Dave Hyatt  <hyatt@apple.com>

	Fix pseudostyles to inherit from the element's style that they are
	specified for.  This is incorrect both for ::first-line and
	::first-letter, but it is at least right for ::before and ::after.

	Fix iframes and objects and embeds so that they will render borders
	when borders are specified (as well as background images).

	Patch iframes so that they correctly let the parent document's
	background show through when the Web page inside the iframe has
	no specified background.  Also patched iframes to understand not
	to blit in this case and to not blit when opacity has been specified
	on the iframe.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:
        * khtml/khtmlview.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::paintRootBoxDecorations):
        * khtml/rendering/render_canvas.cpp:
        * khtml/rendering/render_form.cpp:
        (RenderFormElement::setStyle):
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::calcMinMaxWidth):
        (RenderWidget::setStyle):
        (RenderWidget::paintObject):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::paint):

2003-07-11  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - roll in change from KHTML to remove user and password from referrer

        * khtml/khtml_part.cpp: (KHTMLPart::begin): Call setUser(""), setPass(""),
        and setRef(""), then also set the referrer to "" if the protocol does not
        start with http.

        * kwq/WebCoreBridge.mm: (-[WebCoreBridge referrer]): Remove check to exclude
        file URL referrers because KHTMLPart now excludes all non-http referrers.

        * kwq/KWQKURL.h: Add setUser and setPass functions. Also sort by order within
        the URL so it's clear no methods are omitted.
        * kwq/KWQKURL.mm:
        (KURL::setUser): Added. Adds or removes the username, adding or removing
        delimiters as needed. For now only the remove part is compiled in.
        (KURL::setPass): Added. Adds or removes a password, adding or removing
        delimiters as needed. For now only the remove part is compiled in.

        * kwq/KWQString.h: Add QSTRING_NULL macro to allow us to work around the fact
        that there is no global QString::null object in KWQ without having to do a
        relatively ineffecient conversion from a non-constant char * of 0 each time.
        We can use this anywhere QString::null appears and perhaps get some small code
        savings or performance boost.

        - small cleanup

        * kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Remove unneeded checks that
        repeat optimizations I already put in QString.

2003-07-11  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - added a function Dave needs for various work he's doing that goes
          from a document to the corresponding element in the parent document

        * khtml/xml/dom_docimpl.h: Add ownerElement member function.
        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::ownerElement):
        Added. Gets to the parent part and finds the right element.

2003-07-11  Dave Hyatt  <hyatt@apple.com>

	An initial implementation of the CSS opacity property.  Seems
	to work perfectly except for native widgetry (NSViews).  Images,
	text, borders, and underlines are all properly blended.
	
        Reviewed by rjw

        * config.h:
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        (RenderBox::adjustZIndex):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::transparentAncestor):
        (RenderLayer::isTransparent):
        (commonTransparentAncestor):
        (RenderLayer::updateTransparentState):
        (RenderLayer::beginTransparencyLayers):
        (RenderLayer::endTransparencyLayers):
        (RenderLayer::paint):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        (StyleVisualData::StyleVisualData):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::beginTransparencyLayer):
        (QPainter::endTransparencyLayer):

2003-07-11  Darin Adler  <darin@apple.com>

        Reviewed by Chris.

        - fixed 3305391 -- repro crash in QPixmap::QPixmap after click in SVG using Adobe SVG plugin

        * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Remove code that tried to determine
        if something is an image by looking at the node type. Instead look at the object in the render
        tree and ask it if it's an image. Also use logic that exactly matches what RenderImage uses.

        * kwq/KWQDOMNode.h: Remove unused isImage function.
        * kwq/KWQDOMNode.cpp: Ditto.

2003-07-11  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3300220 -- repro crash in closeURL when choosing from popup menus on www.drivewire.com

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::dispatchGenericEvent): Removed unused local variable. Since we update all documents,
        there was no longer any need to keep that pointer around, but we still had this obsolete code.
        This had nothing to do with the bug, just a related cleanup.
        (NodeImpl::dispatchWindowEvent): Add check for nil. We ref the document pointer, but we don't
        ref the document itself. So we do need to check for the case where the document went away.

2003-07-10  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3217731 -- after going back to a page, forms are submitted with the wrong encoding (back/forward cache)

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): Put decoder from document into the part.

=== Safari-89 ===

2003-07-10  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
	- fixed a bug with saving and restoring location object properties
	
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::saveLocationProperties): Save the location object's properties, not
	the window's (!)
        (KWQKHTMLPart::saveInterpreterBuiltins): New function to save builtin properties of
	the interpeter.
        (KWQKHTMLPart::restoreInterpreterBuiltins): Similarly to restore them.
        (KWQKHTMLPart::openURLFromPageCache): Restore interpreter builtins too.
        * kwq/KWQPageState.h:
        * kwq/KWQPageState.mm:
        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): Handle interpreter builtins.
        (-[KWQPageState invalidate]): Likewise.
        (-[KWQPageState dealloc]): Likewise.
        (-[KWQPageState interpreterBuiltins]): New method.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge saveDocumentToPageCache]): Handle interpeter builtins.

2003-07-10  Darin Adler  <darin@apple.com>

        Reviewed by Chris.

        * config.h: Check in newly generated version which has changed due to changes
        in configure.in.

2003-07-10  Darin Adler  <darin@apple.com>

        Reviewed by Chris.

        - fixed 3317693 -- REGRESSION: many web pages are rendering with wrong layout (columns in HelpViewer, etc.)

        This is a workaround for the code generation bug in gcc that causes this problem with
        gcc 3.3 in optimized builds. We can remove it once both we and B&I are using a newer
        gcc with the fix. The bug number for the gcc problem is 3321716.

        * khtml/rendering/render_box.cpp:
        (workAroundBug3321716): Added. A function that does nothing and takes an integer parameter.
        (RenderBox::setStyle): Add a couple of calls to workAroundBug3321716 in the right places.

2003-07-09  Richard Williamson   <rjw@apple.com>

	Fixed 3141257.  Animate multiple copies of the same
	image on the same page.

        Reviewed by hyatt.

        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::paint):
        * kwq/KWQPixmap.mm:
        (QPixmap::operator=):
        * kwq/WebCoreImageRenderer.h:

2003-07-08  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - removed Jaguar-specific code

        * kwq/KWQComboBox.mm: Remove fudge factor used to move text down and work
        around problem where pop-up menu text draws too high, bug 3030474.

        * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertUsingTEC): Remove hack used
        to work around the lack of TECSetBasicOptions in Jaguar, bug 3201405.

        * config.h: The people with Foundation source trees slug it out with the people
        without Foundation trees, as one line of this file changes back and forth.

2003-07-08  Dave Hyatt  <hyatt@apple.com>

	Make sure that the contents width and height of the view are
	used as the root height and width when a view exists.  This
	ensures that the root element background properly tiles over 
	the entire height of the document.  (This used to be ensured
	by growing the height of the <html> element, but that violates
	the CSS2 spec.)

	This fixes bugs 3317809, 3299789, and 3318066.
	
        Reviewed by john

        * khtml/rendering/render_box.cpp:
        (RenderBox::paintRootBoxDecorations):

2003-07-08  Chris Blumenberg  <cblu@apple.com>

        * WebCore.pbproj/project.pbxproj: Xcode-ified
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::parseTag): fulfilled promise to Darin that I would add a comment about using tolower() instead of | 0x20

2003-07-08  Chris Blumenberg  <cblu@apple.com>

	Fixed: <rdar://problem/3272398>: Safari strips/modifies underscores in EMBED tags

        Reviewed by darin.

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::parseTag): use tolower() to lowercase a char, don't use | 0x20 because that will cause chars like '_' to turn into junk

2003-07-08  Dave Hyatt  <hyatt@apple.com>

	Implementation of inline-block and a prototype of the XUL
	box model.

	Fix for min-font size issues that prevented us from having
	a min font size.  The primary fix is to store the original
	specified CSS size as a separate value (distinct from the
	computed rendering size).  This allows that size to be computed
	without the application of integer rounding or zoom factors
	or minimum font size corrections.

	Fix for table crasher, bug #3296552.

        Reviewed by john (table crasher, inline-block, XUL box model) and
	darin (font size fixes).

        * WebCore.pbproj/project.pbxproj:
        * khtml/css/css_valueimpl.cpp:
        (CSSPrimitiveValueImpl::computeLength):
        (CSSPrimitiveValueImpl::computeLengthFloat):
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/khtml_part.cpp:
        (KHTMLPart::setZoomFactor):
        * khtml/khtmlview.cpp:
        (KHTMLView::print):
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/font.cpp:
        (Font::update):
        * khtml/rendering/font.h:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        (RenderBox::contentHeight):
        (RenderBox::containingBlockWidth):
        (RenderBox::calcWidth):
        (RenderBox::calcHeight):
        * khtml/rendering/render_container.cpp:
        (RenderContainer::addChild):
        * khtml/rendering/render_flexbox.cpp: Added.
        * khtml/rendering/render_flexbox.h: Added.
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        (RenderObject::sizesToMaxWidth):
        (RenderObject::handleDynamicFloatPositionChange):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::paint):
        * khtml/rendering/render_style.cpp:
        (StyleFlexibleBoxData::StyleFlexibleBoxData):
        (StyleFlexibleBoxData::operator==):
        (RenderStyle::RenderStyle):
        (RenderStyle::operator==):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        * khtml/rendering/table_layout.cpp:
        (FixedTableLayout::calcWidthArray):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::recalcStyle):
        (DocumentImpl::attach):

2003-07-07  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3295916 - b/c JavaScriptCore and WebCore are installing in wrong location, private headers are public

        * WebCore.pbproj/project.pbxproj: Install in WebKit.framework/Versions/A/Frameworks.

=== Safari-88 ===

2003-07-03  John Sullivan  <sullivan@apple.com>

	- fixed 3167770 -- visited and unvisited link colors are too 
	close in default stylesheet
	- fixed 3315344 -- default active link color should be red as
	in other browsers

        Reviewed by Hyatt

        * khtml/css/html4.css:
	Changed a:link and a:visited colors to match Mozilla
	(a slightly lighter blue for link, and a purpley shade instead
	of navy for visited). Also changed a:link:active and 
	a:visited:active to be red instead of black.

2003-07-03  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        * khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::parseAttribute):
        Remove livepage.apple.com hack since the site has been changed.

2003-07-02  Darin Adler  <darin@apple.com>

        Rolled out accidentally-checked-in changes.

        * kwq/KWQCharsetData.c:
        * kwq/KWQCharsets.mm:
        * kwq/KWQTextArea.mm:
        * kwq/mac-encodings.txt:
        * kwq/make-charset-table.pl:

2003-07-02  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3299715 -- unrepro nil-deref in KHTMLPart::xmlDocImpl handling timer

        * khtml/khtmlview.cpp: (KHTMLView::timerEvent): Add check for nil.

        - fixed clean builds

        * Makefile.am: Delete the config-timestamp.

        - added some other nil checks (perhaps inspired by some other bug reports, I can't remember)

        * khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::defaultEventHandler):
        Added a check for nil document or nil view.
        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchEvent): ref/deref view for safety.

2003-07-02  Ken Kocienda  <kocienda@apple.com>

        Reviewed by David

	Fix some more build problems with warnings being issued
	when casting and calling methods.

        * kwq/KWQScrollView.mm:
        (QScrollView::addChild):
        (QScrollView::resizeContents):
        (QScrollView::repaintContents):

2003-07-01  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

	A host of changes to work around a compiler bug which issues
	warnings when making objective-c method calls on objects that have 
	been typecast for the purpose of the call.

        * WebCore.pbproj/project.pbxproj:
        * kwq/KWQFileButton.mm:
        (KWQFileButton::setFilename):
        (KWQFileButton::sizeForCharacterWidth):
        (KWQFileButton::frameGeometry):
        (KWQFileButton::setFrameGeometry):
        (KWQFileButton::baselinePosition):
        (KWQFileButton::filenameChanged):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
        * kwq/KWQLineEdit.mm:
        (QLineEdit::setAlignment):
        * kwq/KWQListBox.mm:
        (QListBox::~QListBox):
        (QListBox::clear):
        (QListBox::setSelectionMode):
        (QListBox::insertItem):
        (QListBox::endBatchInsert):
        (QListBox::setSelected):
        (QListBox::isSelected):
        (QListBox::sizeForNumberOfLines):
        * kwq/KWQTextEdit.mm:
        (QTextEdit::setAlignment):
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementForView:]):
        (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]):
        (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]):
        * kwq/WebCoreDOMDocument.mm:
        (+[WebCoreDOMDocumentType documentTypeWithImpl:DOM::]):
        (+[WebCoreDOMImplementation implementionatWithImpl:DOM::]):
        (+[WebCoreDOMDocument documentWithImpl:DOM::]):
        (-[WebCoreDOMDocument importNode::]):
        * kwq/WebCoreDOMNode.mm:
        (+[WebCoreDOMNode nodeWithImpl:DOM::]):
        (-[WebCoreDOMNode insert:before:]):
        (-[WebCoreDOMNode replace:child:]):
        (-[WebCoreDOMNode removeChild:]):
        (+[WebCoreDOMNodeList nodeListWithImpl:DOM::]):
        (+[WebCoreDOMNamedNodeMap namedNodeMapWithImpl:DOM::]):
        (-[WebCoreDOMNamedNodeMap setNamedItem:]):
        (+[WebCoreDOMAttr attrWithImpl:DOM::]):
        (+[WebCoreDOMDocumentFragment documentFragmentWithImpl:DOM::]):
        (+[WebCoreDOMElement elementWithImpl:DOM::]):
        (+[WebCoreDOMEntityReference entityReferenceWithImpl:DOM::]):
        (+[WebCoreDOMCharacterData commentWithImpl:DOM::]):
        (+[WebCoreDOMComment commentWithImpl:DOM::]):
        (+[WebCoreDOMText textWithImpl:DOM::]):
        (+[WebCoreDOMCDATASection CDATASectionWithImpl:DOM::]):
        (+[WebCoreDOMProcessingInstruction processingInstructionWithImpl:DOM::]):

2003-06-30  Chris Blumenberg  <cblu@apple.com>

	Fixed: <rdar://problem/3310066>: All images use wrong map if page has image map of name ""

        Reviewed by dave.

        * config.h:
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::getMap): return 0 if getMap is called with a NULL string instead of treating it like an empty string

2003-06-30  John Sullivan  <sullivan@apple.com>

	- fixed gcc3.3 incompatibility

        Reviewed by Darin

        * kwq/KWQComboBox.mm:
        (QComboBox::updateCurrentItem):
	cast result of getView() in a local variable to work around
	compiler bug where casting in a method call doesn't work (all other
	callers of getView() in this file were already using a local
	variable)

2003-06-26  Chris Blumenberg  <cblu@apple.com>

	More changes to make WebKit and WebCore compile with gcc 3.3.

        Reviewed by darin.

        * kwq/WebCoreBridge.h:

2003-06-26  Chris Blumenberg  <cblu@apple.com>

	Made WebCore compile with gcc 3.3.

        Reviewed by darin.

        * config.h:
        * kwq/KWQLineEdit.mm:
        (QLineEdit::selectAll):
        (QLineEdit::setEdited):
        * kwq/KWQString.h:
        * kwq/KWQString.mm:

=== Safari-85.1 ===

2003-06-15  Vicki Murley  <vicki@apple.com>

        Reviewed by darin.

        * WebCore.pbproj/project.pbxproj: remove SECTORDER_FLAGS variable, so that we don't use order file for our Panther submission

=== Safari-85 ===

2003-06-14  Chris Blumenberg  <cblu@apple.com>

	Fixed: <rdar://problem/3293367>: REGRESSION (83-84): nil-deref in addMetaData loading page in pop-up at live365.com

        Reviewed by darin.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): only call addMetaData if didOpenURL

2003-06-13  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3293031 -- REGRESSION (83-84): extra entry in history when going to page that redirects (live365.com)

        * khtml/khtmlpart_p.h: Initialize m_executingJavaScriptFormAction to false.
        We had left it uninitialized when we fixed 3289047.

2003-06-13  David Hyatt  <hyatt@apple.com>

	Fix for 3292630, misrendered page because of bad doctype.  Add
	this bad doctype to our list of quirky doctypes to fix the
	problem, since the screwed up strict mode rendering is actually
	correct.
	
        Reviewed by john

        * khtml/html/doctypes.cpp:
        (findDoctypeEntry):
        * khtml/html/doctypes.gperf:

2003-06-13  Richard Williamson  <rjw@apple.com>

	Fixed 3282087.  Don't use our <pre> optimizations
	if text contains non-ascii, and consequently may
	result in font substitution.

        Reviewed by Darin.

        * khtml/rendering/render_text.cpp:
        (RenderText::RenderText):
        (RenderText::allAscii):
        (RenderText::shouldUseMonospaceCache):
        * khtml/rendering/render_text.h:

2003-06-13  Richard Williamson  <rjw@apple.com>

        Fixed 3291537.
        Reviewed by John.

        * kwq/KWQObject.mm:
        (QObject::killTimer):
        Only remove the timer is it hasn't fired (and is therefore valid).
        It is NOT permissible to reference a timer's userInfo if it is invalid.

=== Safari-84 ===

2003-06-12  David Hyatt  <hyatt@apple.com>

	Fix for 3289113, body.scrollTop doesn't return the right
	value.  Fix scrollLeft and scrollTop for body tags to just
	use the view's offset.  This matches WinIE behavior.
	
        Reviewed by john

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::getValueProperty):
        (KJS::HTMLElement::putValue):
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_html.lut.h:

2003-06-12  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3289405 -- repro crash in KWQPopUpButtonCell at umax.de

        * kwq/KWQComboBox.mm: (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
        Use the bridge that we got earlier in the function to find the right part. This is
        simpler, and more reliable. The old way would run into trouble if the widget or
        any of the other objects in the chain got destroyed during the event handling.

2003-06-12  Darin Adler  <darin@apple.com>

        Fixed by Richard, reviewed by me.

	- fixed 3289047 -- REGRESSION: can't go back after using form at attwireless.com

        * khtml/khtmlpart_p.h: Add an "executing JavaScript form action" flag.
        * kwq/WebCoreBridge.h: Add an "executing JavaScript form action" flag parameter to
        the reportClientRedirectToURL method.

        * khtml/khtml_part.cpp: (KHTMLPart::submitForm): In the JavaScript case, set a
        flag to say we are executing a JavaScript form action.
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::redirectionTimerStartedOrStopped): Pass the
        isJavaScriptFormAction state over the bridge.

2003-06-11  David Hyatt  <hyatt@apple.com>

	Fix for 3288875, :after/:before content not getting destroyed
	after printing on alistapart.com.  Make the update method for
	pseudos smart enough to destroy generated content when it is
	no longer needed.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
	(RenderBlock::setStyle);
        * khtml/rendering/render_container.cpp:
        (RenderContainer::updatePseudoChild):
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_inline.cpp:
        (RenderInline::setStyle):

2003-06-11  David Hyatt  <hyatt@apple.com>

	Fix for 3288035, the wrong value was being filled in for
	textfields.  Fixed a bug in QString's assignment operator
	that made empty strings become null strings upon assignment.
	Also ensured that the form control never sets the value to
	null but always uses empty instead.
	
        Reviewed by john

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::slotTextChanged):
        * kwq/KWQString.mm:
        (QString::setLatin1):

2003-06-10  David Hyatt  <hyatt@apple.com>

	Fix for 3287870, the <embed hidden=true> feature didn't work.
	hidden should turn the embed into a plugin with a width and
	height of 0.
	
        Reviewed by gramps

        * khtml/html/html_objectimpl.cpp:
        (HTMLEmbedElementImpl::HTMLEmbedElementImpl):
        (HTMLEmbedElementImpl::attach):
        
2003-06-10  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3285820 -- REGRESSION: iframe set up with innerHTML shows up empty (discovered at www.kbs.co.kr)

        * kwq/KWQKHTMLPart.mm: (KHTMLPart::frameDetached): Remove the frame from the parent's
        m_frames list so it's not accidentally reused, since our naming scheme gives frames in
        the same place in the scheme of things the same name.

2003-06-10  David Hyatt  <hyatt@apple.com>

	Fix for 3270813, crash in the code for the CSS content property.
	When copying a DOMString, I missed a required ref.
	
        Reviewed by darin

        * khtml/rendering/render_style.cpp:
        (RenderStyle::setContent):

2003-06-10  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3285120 -- crash in CSSParser::parseColor (originally seen with Panther Mail while indexing)

        * khtml/css/parser.y: Moved DIMEN rule out of unary_term, needed because a term production
        assumes that the values that come out of unary_term are all fValue, not string.
        * khtml/css/parser.cpp: Regenerated.

2003-06-10  Vicki Murley  <vicki@apple.com>

        Reviewed by john.

        * WebCore.order: new order file for 1.0

2003-06-10  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3286343 -- REGRESSION: crashing on pages with text area elements

        * khtml/rendering/render_form.cpp: (RenderTextArea::detach):
        Do cleanup in detach rather than in destructor.
        * khtml/rendering/render_form.h: Remove destructor, add detach.

2003-06-09  Richard Williamson  <rjw@apple.com>

	Fixed 3281761.
	This was a real doozie.  It boiled down to a frame
	attempting to access a siblings window object when that
	frame wasn't loaded and didn't have a document.

        Reviewed by Dave.

        * khtml/ecma/kjs_window.cpp:
        (Window::get):
        (Window::isSafeScript):
        (FrameArray::get):
	Made the isSafeScript more tolerant.  Always allow JS to execute
	if the active domain is nil (local).  Also allow JS to execute
	if the target part has no document yet.

        * khtml/khtml_part.cpp:
        (KHTMLPart::init):
        (KHTMLPart::openURL):
        (KHTMLPart::jScript):
        (KHTMLPart::scheduleRedirection):
        (KHTMLPart::findFrame):
	Flag redirects during load so we can later avoid
	cancelling the redirect when the document would otherwise
	normally load.

        * khtml/khtmlpart_p.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge addData:]):
	Document may now be nil.  Replace assert with conditional check.

2003-06-09  John Sullivan  <sullivan@apple.com>

	- finished fixing crash in 3275675 -- REGRESSION: crash when replacing <div> which contains iframe (at www.kbs.co.kr)

        Reviewed by Darin

        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::resizeWidget):
	check for nil element() before ref/deref'ing

2003-06-09  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - first step in fixing 3275675 -- REGRESSION: crash when replacing <div> which contains iframe (at www.kbs.co.kr)

        * khtml/rendering/render_object.h: Made m_node protected, so RenderWidget can zero it out.
        * khtml/rendering/render_replaced.cpp: (RenderWidget::detach): Set m_node to 0 here.
        RenderWidget does this strange thing of staying around after the DOM node is gone, but we need
        to get rid of the dangling pointer to the DOM node.

        * khtml/rendering/render_frames.cpp:
        (RenderFrame::slotViewCleared): Do nothing if element() is 0, since we are on our way out anyway.
        (RenderPartObject::slotViewCleared): Ditto.

2003-06-09  John Sullivan  <sullivan@apple.com>

	- fixed 3284312 -- repro nil-deref in 
	khtml::RenderTable::cellAbove at pi.nersc.gov

        Reviewed by Darin

        * khtml/rendering/render_table.cpp:
        (RenderTable::cellAbove):
	When the section had 0 rows, we were trying to index the -1st
	row. Fixed by falling into the "didn't find anything" case when
	the row we're going to look in is < 0.

2003-06-09  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3277733 -- REGRESSION: \ in JavaScript mishandled when encoding is Japanese (istweb.apple.com)
        
        This is the third time I've fixed handling of backslash and yen sign. Each time I fixed part
        of the problem but either didn't fix the whole thing or caused a regression. This time I did
        more experiments with other browsers, and I came to the conclusion that all other browsers keep
        the backslash character internally unchanged, and only change to the yen sign when displaying
        rather than decoding to the Unicode "yen sign" character. This makes the backslash character
        different from any other, and requires special code, but it's the only way to match the other
        browsers' behavior. This seems to work great; I retested all the backslash/yen bugs from the
        past to make sure I didn't cause new regressions. The only loose end is the DOM API. It's not
        clear whether the DOM API should return the strings with backslashes or with yen signs, but
        we can probably ship 1.0 without getting that 100% right.

        * kwq/KWQTextCodec.h: Added backslashAsCurrencySymbol() member function.
        * kwq/KWQTextCodec.mm:
        (QTextCodec::fromUnicode): Removed the old workaround for tilde problems, which is not needed
        now that we are back to using "force ASCII" mode, so tildes are always tildes. Updated the comment
        about the backslash hack to better reflect the new situation and change it to use the new
        backslashAsCurrencySymbol() member function.
        (QTextCodec::backslashAsCurrencySymbol): Added. Returns the yen sign for the encodings where
        it's appropriate. Later might do the same thing with the won sign for Korean, depending on what
        we discover as we research bug 3221037 (Korean currency symbol should replace backslash).
        (KWQTextDecoder::convertUsingTEC): Add back the call to TECSetBasicOptions since we once-again
        want to use force-ASCII mode; we turn backslashes into yen signs at a higher level now; internally
        they are kept as backslashes.

        * khtml/xml/dom_docimpl.h: Made setDecoder no longer be inline, and added a decoder member
        function so callers could get the decoder (they need it to figure out what to do with
        backslashes).
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::setDecoder): Made this no longer be an inline. Also made sure it derefs the
        existing decoder. This probably does not happen in practice, but the old version would leak
        if it was ever called twice on the same document.

        * kwq/KWQString.mm: (QString::replace): Made sure that the case of replacing a character
        with the same character has an early out, since that's now the common case with this
        "map backslash to currency character if needed" feature.

        * khtml/xml/dom_stringimpl.h: Made capitalize() const and added a new replace() member function.
        * khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::replace): Implemented this new function
        that replaces one character with another. Returns the existing string if there is no replacing
        to do, otherwise makes a new one.

        * khtml/rendering/render_object.h: Added backslashAsCurrencySymbol() member function.
        * khtml/rendering/render_object.cpp: (RenderObject::backslashAsCurrencySymbol): Added.
        Helper function so render objects have an easier time digging for the "do I need to turn
        the backslashes into currency symbols" flag.

        * kwq/KWQKHTMLPart.h: Added backslashAsCurrencySymbol() member function.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setTitle): Convert title to use yen sign.
        (KWQKHTMLPart::setStatusBarText): Convert status bar text to use yen sign.
        (KWQKHTMLPart::runJavaScriptAlert): Convert message text to use yen sign.
        (KWQKHTMLPart::runJavaScriptConfirm): Convert message text to use yen sign.
        (KWQKHTMLPart::runJavaScriptPrompt): Convert message text and default value to use yen sign,
        convert result back from yen sign to backslash.
        (KWQKHTMLPart::attributedString): Convert pieces of text to use yen sign when building up
        the attributed text.
        (KWQKHTMLPart::backslashAsCurrencySymbol): Added.
        Helper function so render objects have an easier time digging for the "do I need to turn
        the backslashes into currency symbols" flag.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge selectedString]): Convert text to use yen sign before returning to WebKit.
        (-[WebCoreBridge elementAtPoint:]): Convert title and alt strings to use yen sign before
        returning them to WebKit.

        * khtml/rendering/render_form.cpp:
        (RenderSubmitButton::rawText): Convert button label to use yen sign.
        (RenderLineEdit::updateFromElement): Convert text for line edit to use yen sign.
        (RenderLineEdit::slotTextChanged): Convert yen sign to backslash on the way in from line edit.
        (RenderSelect::updateFromElement): Convert text for select items to use yen sign.
        (RenderTextArea::updateFromElement): Convert text for text areas to use yen sign.
        (RenderTextArea::text): Convert yen sign to backslash on the way in from text area.
        * khtml/rendering/render_image.cpp:
        (RenderImage::paintObject): Convert alt text to use yen sign before drawing it.
        * khtml/rendering/render_text.cpp:
        (RenderText::RenderText): Convert text to use yen sign before drawing it.
        (RenderText::setText): Ditto.

        - fix a problem that was bugging the shit out of me where we kept rebuilding config.h

        * Makefile.am: Use the config-timestamp file to decide when to remake config.h so
        we don't end up making it over and over again. Also don't bother to grep out NO_LICENSE
        any more since that's long gone.
        * .cvsignore: Ignore the config-timestamp file.

=== Safari-83 ===

2003-06-09  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3280538 -- JavaScript infinite loop loading frame b/c scrollHeight is always zero (easons.ie)

        * khtml/xml/dom_docimpl.h: Added updateLayout method.
        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateLayout): Added. Code moved here
        from KJS::Window::updateLayout so it can be shared. Named this updateLayout() to match
        the name from KJS::Window.

        * khtml/ecma/kjs_window.cpp: (Window::updateLayout): Call updateLayout()
        instead of updateRendering(); the extra logic here was moved into updateLayout().
        * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Ditto.

        * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getValueProperty): Call updateLayout()
        on the document before computing the BodyScrollHeight or BodyScrollWidth, much as
        we already do in kjs_dom.cpp for ScrollHeight and ScrollWidth and other properties.

2003-06-05  David Hyatt  <hyatt@apple.com>

	Fix for crash on an XHTML frameset page.  It was assuming
	that all docs were HTML. The bug # is 3277973.
	
        Reviewed by john

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::updatePolicyBaseURL):
        (KWQKHTMLPart::setPolicyBaseURL):

2003-06-05  David Hyatt  <hyatt@apple.com>

	Fix for 3281030, stylesheets can't be enabled properly via
	script.  Test case from Dirk.  The fix is to make the setting
	of the state happen independently of the attribute setting.
	
        Reviewed by john

        * khtml/dom/html_head.cpp:
        (HTMLLinkElement::setDisabled):
        * khtml/html/html_headimpl.cpp:
        (HTMLLinkElementImpl::setDisabledState):
        (HTMLLinkElementImpl::parseAttribute):
        * khtml/html/html_headimpl.h:

2003-06-05  Chris Blumenberg  <cblu@apple.com>

        Fixed: <rdar://problem/3268751>: REGRESSION: crash in KWQValueListImpl selecting connection speed at news.com

        Reviewed by darin.

        * kwq/KWQButton.mm:
        (QButton::clicked): Don't call clicked if the button was destroyed inside of sendConsumedMouseUpIfNeeded.

2003-06-05  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3279206 -- REGRESSION: new page does not load after selecting item from list and hitting 'Go' button

        * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::encoding): Use value() in a couple of places
        that were still directly using m_value.

2003-06-05  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3278079 -- REGRESSION: UTF-8 page claiming to be UTF-16 in XML header gives garbage characters

        * khtml/misc/decoder.cpp: (Decoder::setEncoding): Add EncodingFromXMLHeader as one of the
        types where we know the encoding is an 8-bit one. The reason this is a regression is that we
        used to ignore the encoding in the XML header altogether.

2003-06-04  John Sullivan  <sullivan@apple.com>

	- fixed 3279957 -- REGRESSION: assertion failure at launch in 
	Decoder::~Decoder() importing bookmarks

	Richard actually wrote this fix.
        Reviewed by me, Darin

        * kwq/WebCoreEncodings.mm:
        (+[WebCoreEncodings decodeData:]):
	don't use stack-based decoder; use new instead. 

2003-06-04  David Hyatt  <hyatt@apple.com>

	Fix for 3273300, leaks in cssyyparse.  Function forgot to delete
	its args value list when destroyed.
	
        Reviewed by gramps

        * khtml/css/cssparser.h:

2003-06-03  David Hyatt  <hyatt@apple.com>

	Fix for 3259647, crash when printing a table page.  This is fixed
	on the KDE KHTML trunk.  The loop shouldn't be broken out of
	when you have column elements so that all sections can recalc
	their cell grids as needed.
	
        Reviewed by kocienda

        * khtml/rendering/render_table.cpp:
        (RenderTable::recalcSections):

=== Safari-82 ===

2003-06-03  Richard Williamson   <rjw@apple.com>

	Fixed 3275565.  Ref count the decoder.

        Reviewed by Ken.

        * khtml/khtml_part.cpp:
        (KHTMLPart::clear):
        * khtml/misc/decoder.cpp:
        (Decoder::Decoder):
        (Decoder::~Decoder):
        * khtml/misc/decoder.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::~DocumentImpl):
        * khtml/xml/dom_docimpl.h:
	

2003-06-02  David Hyatt  <hyatt@apple.com>

	Fix for 3276099.  value() was wrong for radio buttons.  Needed
	to get it from the attribute since I was no longer caching
	anything in m_value.
	
        Reviewed by kocienda

        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::value):

2003-06-02  Ken Kocienda  <kocienda@apple.com>

        Code written by darin
        Reviewed by me

	Fix for this bug:

	<rdar://problem/3272162>: repro crash in khtml::CachedImage::checkNotify() on particular page

        * khtml/ecma/kjs_html.cpp:
        (Image::putValue): ref onLoadListener when setting a value to onLoad
        (Image::~Image): deref onLoadListener when destructing the image.

2003-06-02  David Hyatt  <hyatt@apple.com>

	Fix for 3263679, color: # doesn't parse.  Fix is to add an
	error-handling case for # by itself to parser.y.
	
        Reviewed by gramps/ken

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:

=== Safari-81 ===

2003-06-02  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3256787 -- HOMEPAGE:\000 characters being added by Safarin in Form submission,
        causing an exception in property list parsing

        * kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Encode \ as 5C instead of 815F
        when encoding Shift-JIS. This should make the Apple Store work again. The only thing
        we lose is the ability to send an actual Shift-JIS backslash (815F), but I think that
        is almost never needed. In other browsers you can't even type a backslash in Shift-JIS.

2003-06-02  Ken Kocienda  <kocienda@apple.com>

        * config.h:

2003-06-02  David Hyatt  <hyatt@apple.com>

	Fix for 3275136.  Make sure that when the checked attribute
	is set dynamically (something we were ignoring before my previous
	patch) that we also properly update the radio button array in
	the document.
	
        Reviewed by gramps

        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::parseAttribute):
        (HTMLInputElementImpl::attach):
        (HTMLInputElementImpl::reset):

2003-05-30  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Chris.

	- fixed 3169067 - PEOPLESOFT: left frame missing; frame RenderRoot height and width are both zero

        * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): Update layout before scrolling.

2003-05-30  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3273544 - REGRESSION: Page disappears at http://www.urban-advantage.com/
	
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::getElementById): Return null when the ID is the
	empty string. Otherwise we'll return the first element in the
	document, usually the top-level HTML element, which is wrong and
	does not match other browsers.

2003-05-30  Richard Williamson  <rjw@apple.com>

	As part of some cleanup when fixing 3272516 changed use of
	@"" for cache keys to NSString declarations.

        Reviewed by Ken.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):

2003-05-30  David Hyatt  <hyatt@apple.com>

	Fix for 3269129 and 3269220.  setAttribute('value') didn't work
	for inputs.  Basically defaultValue and defaultChecked have never
	worked.  This patch fixes the problem by making sure that for both
	value and checked you have a two-tier system where you look first
	for the value as altered by the control (or by setting the DOM
	property) and if that isn't set then you look at the default value.

	This allows setAttribute (which changes the *default*) to work in
	the cases where the control has not overridden the default 
	with a different value.
	
        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::HTMLInputElementImpl):
        (HTMLInputElementImpl::state):
        (HTMLInputElementImpl::parseAttribute):
        (HTMLInputElementImpl::attach):
        (HTMLInputElementImpl::reset):
        (HTMLInputElementImpl::setChecked):
        (HTMLInputElementImpl::value):
        (HTMLInputElementImpl::setValue):
        (HTMLInputElementImpl::isCheckedRadioButtonForDocument):
        * khtml/html/html_formimpl.h:
        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::RenderLineEdit):
        (RenderLineEdit::calcMinMaxWidth):
        (RenderLineEdit::updateFromElement):
        (RenderLineEdit::slotTextChanged):
        * khtml/rendering/render_form.h:

2003-05-30  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - added "sjis" as a synonym for "Shift_JIS"; this might fix 3235161,
        HOMEPAGE: Publishing page with Japanese characters w/ Safari generates an error,
        but I am currently unable to test the fix.

        * kwq/mac-encodings.txt: Added sjis to the Shift_JIS line.
        * kwq/KWQCharsetData.c: Regenerated.

2003-05-29  David Hyatt  <hyatt@apple.com>

	Fix for 3263156, stack overflow at www.liceo.edu.mx.  This
	site nests about 500 bold tags, only closes some of them, 
	and then opens 500 more, etc.

	The fix for this problem is to stop honoring tags in the parser
	after you see 20 identical tags.  We do this only for fontstyle HTML
	tags.
	
        Reviewed by john/darin

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::getElement):
        (KHTMLParser::allowNestedRedundantTag):
        * khtml/html/htmlparser.h:

2003-05-30  John Sullivan  <sullivan@apple.com>

        Reviewed by Chris

        * khtml/rendering/break_lines.cpp:
	Removed #ifdef/#else for which the two sides were identical
	that I noticed in passing.

2003-05-29  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- fixed 3270373 - MALLORY: repro crash in +[KWQObjectTimerTarget stopDeferringTimers] while changing folder

        * kwq/KWQObject.mm:
        (QObject::killTimer): Remove the timer from the deferred list too - clients expect that a timer
	will never be delivered after the object was killed.
        (QObject::killTimers): Use killTimer on each timer for this object instead of trying
	to be tricky. 
        (-[KWQObjectTimerTarget timerFired]): Don't add a timer to the deferred list more than once,
	because there's no benefit in ganging up multiple firings while deferred, and it makes other
	things simpler.
        (+[KWQObjectTimerTarget stopDeferringTimers]): Make sure to remove the timer before firing it, 
	since it may also cancel itself, and we don't want to remove an extra timer in that case.

2003-05-29  Richard Williamson   <rjw@apple.com>

	Support for the 'estimatedProgress' method on
	WebView.  Added bridge access to the number of pending or still
	loading requests (from KHTML's perspective).  This is used to
	more accurately guess at the total remaining bytes to load.

        Reviewed by Chris.

        * kwq/KWQLoader.h:
        * kwq/KWQLoader.mm:
        (KWQServeRequest):
        (KWQNumberOfPendingOrLoadingRequests):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge numPendingOrLoadingRequests]):

2003-05-29  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej

	Fix for this bug:

	<rdar://problem/3271697>: Search fails at travel site

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::parseAttribute): Allow form method to be set
	to GET from javascript.

2003-05-29  John Sullivan  <sullivan@apple.com>

	- fixed MIME type leaks that were most of 3272566 
	(several leaks after visiting amazon.com and emptying cache)

        Reviewed by Darin

        * kwq/KWQPixmap.mm:
        (QPixmap::QPixmap):
        (QPixmap::operator=):
	fixed two leaks of MIME string

2003-05-29  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3269564 -- dynamically-created forms look right, but don't post values when submitted

        * khtml/html/html_formimpl.h: Remove useless virtual setParent function.
        Since the inherited setParent is not virtual, it does no good to make the subclass
        override it with a virtual function.
        * khtml/html/html_formimpl.cpp: Remove useless virtual setParent.
        (HTMLGenericFormElementImpl::attach): Add code here, cribbed from setParent, to add
        a new form element to the form it's in.
        (HTMLButtonElementImpl::attach): A copy of the code is also needed here.

        * WebCore.pbproj/project.pbxproj: Let Project Builder be Project Builder.

2003-05-28  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3263157 - REGRESSION: tabbing into a secure password field shows contents

        * kwq/KWQTextField.mm:
        (-[KWQSecureTextField textDidEndEditing:]): Make sure to restore bullet mode if we
	accidentally lose it.

2003-05-27  Maciej Stachowiak  <mjs@apple.com>

        Rolled in fix from Safari-80~1-branch

    2003-05-27  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * WebKit.pbproj/project.pbxproj: Removed no longer needed and harmful flag.
	
2003-05-25  David Hyatt  <hyatt@apple.com>

	Fix for 3268589, static position miscomputed when the positioned object is the last item in its enclosing block and when its previous sibling is a text run that ends in a space.  In this case we need to clear our trailingSpaceObject so that we don't mist
akenly ignore the positioned object when building up bidi runs.

	Fix for 3260053, table-layout of inherit not supported.  This
	caused a crash.  The fix is to just add in the support for the inherit
	value to the style selector.
	
        Reviewed by john

        * khtml/rendering/bidi.cpp:
	* khtml/css/cssstyleselector.cpp
	
2003-05-26  John Sullivan  <sullivan@apple.com>

	- fixed 3262849 -- jump to nil in KWQKHTMLPart::searchForLabelsAboveCell 
	at techbargains.com

        Reviewed by Dave

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::searchForLabelsAboveCell):
	check for nil result of cellAboveRenderer->element()

2003-05-23  David Hyatt  <hyatt@apple.com>

	Fix for 3229799, images missing on geocities page.  Residual style
	needs to understand when you reopen tags at a malformed table 
	content boundary and make sure the newly-reopened tags also know
	they are malformed table content so that they get cleaned up
	properly.
	
        Reviewed by darin

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::handleResidualStyleCloseTagAcrossBlocks):
        (KHTMLParser::reopenResidualStyleTags):
        (KHTMLParser::popBlock):
        * khtml/html/htmlparser.h:

2003-05-22  David Hyatt  <hyatt@apple.com>

	Fix for 3248176, failed assertion on blizzard's world of warcraft
	page.  They dynamically changed the position of an element from
	absolute to relative, and this element was inside an inline.
	The setStyle() code has to be smart enough to split the inline
	flow when the element is no longer absolute positioned.

	This patch makes a splitFlow occur like it should and it also
	cleans up anonymous block creation with a new helper function
	on RenderObject, createAnonymousBlock.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_inline.cpp:
        (RenderInline::splitFlow):
        * khtml/rendering/render_object.cpp:
        (RenderObject::createAnonymousBlock):
        (RenderObject::handleDynamicFloatPositionChange):
        (RenderObject::setStyle):
        * khtml/rendering/render_object.h:

2003-05-22  David Hyatt  <hyatt@apple.com>

	Fix for 3259947.  Can't add clippings on iht.com.  The fix is
	to make sure all DOM properties that relate to attributes return ""
	and not "null" when the attribute isn't present or when the 
	DOMString is null.

	Also patching the code for text-indent to make sure that floats
	don't improperly consume text-indent.  This fixes two of the issues
	on diveintomark.
	
        Reviewed by mjs

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::tryGet):
        (KJS::HTMLElement::getValueProperty):

2003-05-22  David Hyatt  <hyatt@apple.com>

	Make sure the overflow clip rect clips out the scrollbars
	so that child layers aren't able to draw on top of the
	scrollbars.

	Also fix scrollbars so that they are painted before the
	overflow clip rect is applied (just as backgrounds and borders
	are).

	These two fixes make the divtest example from Yahoo (sent by Mark
	Malone) work.
	
        Reviewed by john

        * khtml/rendering/render_box.cpp:
        (RenderBox::getOverflowClipRect):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):

2003-05-22  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3216039 -- calls to m_redirectionTimer.stop() do not always clear m_scheduledRedirection

        * khtml/khtml_part.h: Added cancelRedirection().
        * khtml/khtml_part.cpp:
        (KHTMLPart::~KHTMLPart): Call cancelRedirection() instead of m_redirectionTimer.stop().
        (KHTMLPart::restoreURL): Ditto.
        (KHTMLPart::openURL): Ditto.
        (KHTMLPart::closeURL): Ditto.
        (KHTMLPart::cancelRedirection): Added. Sets m_scheduledRedirection to noRedirectionScheduled
        and calls m_redirectionTimer.stop(), but is also safe to call after d is set to 0.
        (KHTMLPart::restoreState): Call cancelRedirection() instead of m_redirectionTimer.stop().

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURLFromPageCache): Call cancelRedirection() instead of m_redirectionTimer.stop().
        (KWQKHTMLPart::scrollToAnchor): Call cancelRedirection() instead of m_redirectionTimer.stop()
        (and setting m_scheduledRedirection).

2003-05-21  David Hyatt  <hyatt@apple.com>

	This patch deals with the main cause of regressions from
	the minimum font size removal.  Because we stored font sizes
	as integers, we ended up flooring font sizes, and when percentages
	were nested, the magnitude of error increased dramatically.

	This patch changes FontDef to store a float size instead of an
	integer size.  The style system thus always computes a precise
	floating point value for a font, with no error introduced and
	only once it has that final computed value does it round to the
	nearest pixel for the QFont.

	This fixes 3265628, www.anandtech.com.
	
        Reviewed by rjw

        * khtml/css/css_valueimpl.cpp:
        (CSSPrimitiveValueImpl::computeLengthFloat):
        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/font.cpp:
        (Font::update):
        * khtml/rendering/font.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::recalcStyle):

2003-05-21  David Hyatt  <hyatt@apple.com>

	Fix for 3257990, attributes in HTML should always be case-insensitive
	when matching CSS attribute selectors.  Instead of relying on 
	the strict mode check, I patched the code to use an isXMLDoc
	bool instead.

	Also fixing a problem where <pre>s are mistakenly justifying their
	text when text-align: justify is set.
	
        Reviewed by kocienda

        * ChangeLog:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/bidi.cpp:

2003-05-21  Vicki Murley  <vicki@apple.com>

        Reviewed by john 
	- fixed 3234553: Safari and its frameworks should link using order files

        * WebCore.order: Added.
        * WebCore.pbproj/project.pbxproj: set SECTORDER_FLAGS = -sectorder __TEXT __text WebCore.order

2003-05-20  David Hyatt  <hyatt@apple.com>

        An implementation of fieldset and legend.  This is based off
	some KHTML trunk code, but only loosely.  I had to rewrite
	most of it in order to make fieldsets work properly with
	padding and in order to match the fieldset style of other
	browsers more closely.

	This code also fixes HTML4 buttons so that they don't fill the
	width of containing blocks.  This has been a long-standing
	bug.  Since legends behave the same way as buttons and floats,
	I made a new helper function, sizesToMaxWidth(), to denote an
	element that just uses its max intrinsic width when sizing
	instead of filling a containing block.

        This patch also fixes z-index so it properly only applies to the 
	root and to positioned/relpositioned elements.  
        
        Reviewed by darin

        * ChangeLog:
        * ForwardingHeaders/rendering/render_block.h: Added.
        * khtml/css/html4.css:
        * khtml/html/html_formimpl.cpp:
        (HTMLFieldSetElementImpl::HTMLFieldSetElementImpl):
        (HTMLFieldSetElementImpl::attach):
        (HTMLFieldSetElementImpl::createRenderer):
        (HTMLLegendElementImpl::HTMLLegendElementImpl):
        (HTMLLegendElementImpl::id):
        (HTMLLegendElementImpl::attach):
        (HTMLLegendElementImpl::createRenderer):
        * khtml/html/html_formimpl.h:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        (RenderBox::calcWidthUsing):
        * khtml/rendering/render_canvas.cpp:
        * khtml/rendering/render_form.cpp:
        (RenderFieldset::RenderFieldset):
        (RenderFieldset::layoutLegend):
        (RenderFieldset::findLegend):
        (RenderFieldset::paintBoxDecorations):
        (RenderFieldset::paintBorderMinusLegend):
        (RenderLegend::RenderLegend):
        * khtml/rendering/render_form.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::sizesToMaxWidth):
        * khtml/rendering/render_object.h:

2003-05-19  David Hyatt  <hyatt@apple.com>

	Fix for 3262890, logical font sizes (e.g., large) cannot be applied
	to monospace tags like <pre> and <tt>.  The fix adds a notion of
	the current logicalSize in effect for a given FontDef so that
	shifts in family as you go down the style tree result in an
	auto-correction of the size.

	Note that with the addition of this cached logicalSize property,
	it will be possible to eliminate the two separate logical size
	tables and implement the monospace table as a "zoom factor" applied
	to the normal table (an idea long ago suggested by darin).
	
        Reviewed by darin

        * ChangeLog:
        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/font.h:

=== Safari-80 ===

2003-05-19  Maciej Stachowiak  <mjs@apple.com>

        - fixed 3261096 - Make WebKit an umbrella framework

        * WebCore.pbproj/project.pbxproj: In a B&I build, compile as a
	sub-umbrella of WebKit.

2003-05-19  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin
	
	Fixed build problem with declaring MIMEType as a category
	on NSObject. This method needs to be typed to return NSString.

        * kwq/KWQLoader.mm

2003-05-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- fixed 3260940 - REGRESSION: reproducible crash freeing page cache item
	- fixed 3241041 - REGRESSION: repro world leak of 1 JavaScript interpreter

	The fix for these problems and probably other page cache wackiness
	was to use a refcounting scheme for KHTMLView instead of counting
	on the previous tricky ownership rules.
	
        * khtml/khtmlview.cpp:
        (KHTMLView::KHTMLView): Initialize _refCount to 1.
        (KHTMLView::~KHTMLView): Assert that _refCount is 0, to make sure no one is deleting
	views explicitly.
        * khtml/khtmlview.h:
        * khtml/rendering/render_frames.cpp:
        (RenderPart::~RenderPart): If our view is a KHTMLView, deref it.
        (RenderPart::setWidget): If the view is a KHTMLView, tell the superclass not to
	delete it and ref it.
        * khtml/rendering/render_frames.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::RenderWidget): Initizlize m_deleteWidget to false.
        (RenderWidget::~RenderWidget): Only delete widget if we're supposed to.
        (RenderWidget::setQWidget): Add extra delegeWidget argument that says whether
	to delete this widget when done - defaults to true.
        * khtml/rendering/render_replaced.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): Removed _ownsView boolean -- we'll always hang on
	to a ref to it now.
        (KWQKHTMLPart::~KWQKHTMLPart): Deref the view always instead of deleting it sometimes.
        (KWQKHTMLPart::setView): deref the old view if not null. ref the new view if not null.
	Drop tricky ownership rules.
        (KWQKHTMLPart::openURLFromPageCache): Remove no longer applicable comment about the
	importance of when setView is called.
        * kwq/KWQPageState.mm:
        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]): ref the
	document's view.
        (-[KWQPageState invalidate]): deref the document's view.
        (-[KWQPageState dealloc]): deref the document's view instead of deleting it.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge createKHTMLViewWithNSView:marginWidth:marginHeight:]): No more need
	to pass weOwnIt argument to setView. Also, deref the view after passing it to the
	KWQKHTMLView -- we own the initial ref since we allocated it.
        (-[WebCoreBridge removeFromFrame]): No more need to pass weOwnIt argument to setView.
        (-[WebCoreBridge installInFrame:]): Ditto.

2003-05-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3256997 - reproducible world leak (of 1 JavaScript interpreter) using google images 

	This turned out to be a page cache bug, and nothing to do with
	JavaScript. The part and view were also leaked.
	
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURLFromPageCache): Make sure to reset the view
	before resetting the document, so that when we check if the
	document is in the page cache to determine if we can delete the
	old view, we'll be checking the old document instead of the new
	one.

2003-05-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- fixed 3168588 - Can't click on links at Nike site (Image onload handler problem)

	The fix was to implement the onload property for Image objects
	(which are entirely different from <img> HTML elements).

        * khtml/ecma/kjs_html.cpp:
        (Image::getValueProperty): Implement access to onload attribte.
        (Image::tryPut): Use putValue cause we're gonna use the hashtable now.
        (Image::putValue): Moved guts of tryPut here. Implement setting of
	onload attribute.
        (Image::notifyFinished): Fire onload event if there is a listener.
        (Image::Image): initialize onload listener to null.
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_html.lut.h: Regenerated.

=== Safari-79 ===

2003-05-14  David Hyatt  <hyatt@apple.com>

	Fix for 3248193.  Floats with layers paint twice.  The fix
	is to make sure floats are not painted during the float phase
	if they also have a layer.
	
        Reviewed by john
	
        * khtml/rendering/render_block.cpp:

2003-05-14  David Hyatt  <hyatt@apple.com>

	Fix for 3258389, min-width should take precedence over max-width.
	I just had an "else" that shouldn't have been there, so that
	min-width would get checked even if max-width was also checked.
	
        Reviewed by kocienda

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidth):

2003-05-14  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Don.

	- fixed 3257307 - REGRESSION: crash using onFocus="this.blur()"
	
        * kwq/KWQTextField.mm:

        (-[KWQTextField setHasFocus:]): Don't call
	KWQKHTMLPart::setDocumentFocus(widget) to start with, it might
	invoke a handler which could call blur(), and we don't want to do
	the selection handling after that; futhermore, it will get called
	anyway when we deliver the FocusIn event to the event
	filter. Also, sometimes unfocusing in the middle of a focus can
	leave us and AppKit in an inconsistent state; correct this. A
	comment explains the details.

2003-05-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3240129 - REGRESSION: www.ezprints.com navigation buttons don't show up (window.addEventListener)

	The problem here was that event handlers set using
	window.addEventListener were set as regular event handlers on the
	document object instead of as window event handlers - and the load
	event does not fire properly that way. 

	The fix was to add support for both HTML and non-HTML window event
	handlers. The old window event methods supported only "HTML"
	handlers, but were not named as such.

        * khtml/ecma/kjs_window.cpp:
        (Window::setListener): Use setHTMLWindowEventListener.
        (Window::getListener): Use getHTMLWindowEventListener.
        (WindowFunc::tryCall): use addWindowEventListener and removeWindowEventListener
	on the DocumentImpl instead of addEventListener and removeEventListener on the
	Document.
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseAttribute): Use setHTMLWindowEventListener
	instead of the old setWindowEventListener.
        * khtml/xml/dom_docimpl.cpp:
	(DocumentImpl::defaultEventHandler): Don't stop after the first
	window event handler - keep going, since there might now be more
	than one for the same event.
        (DocumentImpl::setHTMLWindowEventListener): Renamed from setWindowEventListener.
        (DocumentImpl::getHTMLWindowEventListener): Renamed from getWindowEventListener.
        (DocumentImpl::removeHTMLWindowEventListener): Renamed from removeWindowEventListener.
        (DocumentImpl::addWindowEventListener): Implemented - support adding non-HTML window
	event listeners, which, unlike html listeners, are nto exclusive - there may be more
	than one.
        (DocumentImpl::removeWindowEventListener): Implemented.
        (DocumentImpl::hasWindowEventListener): Check if a window has any handler at all
	for a prticular event.
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::addEventListener): Add ref/deref pair to protect against last ref of listener
	going away on remove. Correct comment about the removal.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::canCachePage): Check for an UNLOAD event handler
	using hasWindowEventListener instead of getHTMLWindowEventListener, to
	check for even addListener-style unload handlers.

2003-05-13  David Hyatt  <hyatt@apple.com>

	Fix for 3222607.  divs that specify a fixed width should have
	their minwidths increased to that width.  This is an issue
	on diveintomark's list as well as a blocker for Benoit.
	
        Reviewed by gramps

        * khtml/rendering/render_block.cpp:

2003-05-13  David Hyatt  <hyatt@apple.com>

	Fix for 3256376, absolute positioned content that had to be
	scrolled into view would not respond to events.  This is a 
	regression caused by fixing the size of the HTML element.

	I stopped all of the updating of layer widths/heights in
	setLayouted and in setWidth/Height of RenderBox and special-cased
	the sizing of the RenderCanvas layer so that it always encloses
	all content.

	This patch also contains a fix for 3211915, left/top positions
	not computed properly when auto or static.  The patch adds
	staticX/Y member variables to RenderBox that holds the cached
	values that can then be used by positioned elements to determine
	their correct positions in the flow.  RenderStyles also now
	remember both the original display of an element as well as
	the mutated display (e.g., when an inline becomes a block
	because of absolute positioning).
	
        Reviewed by darin (canvas fix) and kocienda (left/top fix)

        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_box.cpp:
        (RenderBox::RenderBox):
        (RenderBox::position):
        (RenderBox::setStaticX):
        (RenderBox::setStaticY):
        (RenderBox::calcAbsoluteHorizontal):
        (RenderBox::calcAbsoluteVertical):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_canvas.cpp:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::createInlineBox):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):
        * khtml/rendering/render_line.cpp:
        (InlineFlowBox::placeBoxesHorizontally):
        (InlineFlowBox::adjustMaxAscentAndDescent):
        (InlineFlowBox::computeLogicalBoxHeights):
        (InlineFlowBox::placeBoxesVertically):
        (InlineFlowBox::shrinkBoxesWithNoTextChildren):
        * khtml/rendering/render_object.cpp:
        (RenderObject::hasStaticX):
        (RenderObject::hasStaticY):
        (RenderObject::setNeedsLayout):
        (RenderObject::createInlineBox):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::createInlineBox):
        * khtml/rendering/render_text.h:

2003-05-13  Richard Williamson   <rjw@apple.com>

	Fixed 3014661.  We now display (a lame Lemay) image
	when an image fails to load.  We also display the 
	alt text if it fits within the image container
	above the missing image icon.  Alt text is also
	now shown if image loading is disabled.

        Reviewed by John.

        * khtml/misc/loader.cpp:
        (CachedImage::data):
        (Cache::init):
        * khtml/rendering/render_image.cpp:
        (RenderImage::paintObject):
        (RenderImage::reload):
        * kwq/KWQPixmap.h:
        * kwq/KWQPixmap.mm:
        (KWQLoadPixmap):
        (QPixmap::QPixmap):
        (QPixmap::isNull):
        * kwq/WebCoreImageRenderer.h:
        * kwq/WebCoreImageRendererFactory.h:

2003-05-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu

        * khtml/ecma/kjs_proxy.cpp:
        (KJSProxyImpl::evaluate): Pass the filename.
        * kwq/WebCoreJavaScript.h:
        * kwq/WebCoreJavaScript.mm:
        (+[WebCoreJavaScript shouldPrintExceptions]): Call through to JavaScriptCore.
        (+[WebCoreJavaScript setShouldPrintExceptions:]): Call through to JavaScriptCore.
        * khtml/ecma/kjs_events.cpp:
        (JSEventListener::handleEvent): Print exception if there is one.
        * khtml/ecma/kjs_window.cpp:
        (ScheduledAction::execute): Print exception in the function case.

2003-05-13  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3140822 -- relative URLs starting with query strings clobber path as the RFC says, but web says no

        * kwq/KWQKURL.mm: (KURL::KURL): Add a case for queries (as with anchors) to match
        the behavior of the web (albeit not the RFC).

2003-05-13  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3120355 -- importing IE favorites garbles non-ASCII characters (esp. bad for non-Roman languages)

        * kwq/WebCoreEncodings.h: Added decodeData:, removed all other (unused) methods.
        * kwq/WebCoreEncodings.mm: (+[WebCoreEncodings decodeData:]): Added. Calls the same
        decoder used to decode web pages.

2003-05-13  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3228186 -- REGRESSION: crash walking parent tree at housingscc.org in DOM::StyleBaseImpl::stylesheet()

        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::~ElementImpl): Unref the stylesheet with the style declaration in it
        when destroying the element.
        (ElementImpl::createDecl): Ref the stylesheet with the style declaration in it when
        making a style element for this. If we don't we could end up with a style declaration
        without a stylesheet, which can't be manipulated by the CSS parser.

        * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::removeCSSProperty): Since this
        function has a side effect of changing the stylesheet for the style declaration, ref
        the new stylesheet and unref the old one.

2003-05-12  Richard Williamson  <rjw@apple.com>

        Fixed 3194614 and 3194751.  We avoid creating and render objects
        and loading any images if the document is in 'renderless' mode.
        
        Also, we now unique instances of the ObjC DOM wrappers.
        
        Reviewed by hyatt/darin.

        * khtml/misc/loader.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        * kwq/KWQLoader.h:
        * kwq/KWQLoader.mm:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        * kwq/WebCoreDOMNode.mm:
        * kwq/WebDOMNode.h:

        Pass the reported MIME type of an image up to WebKit when
        creating an WebImageRenderer.  This is useful to help speed up
        the selection of an appropriate decoder.
        
        Reviewed by darin.

        * kwq/WebCoreImageRendererFactory.h:
        * kwq/KWQPixmap.h:
        * kwq/KWQPixmap.mm:

2003-05-12  Darin Adler  <darin@apple.com>

        Reviewed by Richard.

        - fixed 3240925 -- can't select or copy text from readonly INPUT elements

        An AppKit peculiarity. Calling setEditable:NO will have a side effect of
        doing setSelectable:NO unless you explicitly did setSelectable:YES.

        * kwq/KWQLineEdit.mm:
        (QLineEdit::QLineEdit): Call setSelectable:YES.

        * kwq/KWQTextField.mm:
        (-[KWQTextField setPasswordMode:]): When creating the password field, keep
        the setSelectable state synchronized.
        (-[KWQTextField setSelectable:]): If we already have a password field, be
        sure to keep its selectable state the same as the main field.

2003-05-12  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3255281 -- REGRESSION: objc_error in key loop code, closing tab containing aintitcool.com page

        * kwq/KWQTextField.mm:
        (-[KWQSecureTextField nextKeyView]): Change back to using our own nextKeyView
        implementation. By returning the nextKeyView from KWQTextField, we ended up making
        AppKit very upset about the key view loop. This undoes a change I made last
        Thursday, so the regression is very new and was never in a release.
        (-[KWQSecureTextField previousKeyView]): More of the same.
        (-[KWQSecureTextField nextValidKeyView]): Ditto.
        (-[KWQSecureTextField previousValidKeyView]): Ditto.

2003-05-11  David Hyatt  <hyatt@apple.com>

	The root element (HTML) tries to set itself to the lowest position
	of the canvas, before the canvas has necessarily even determined
	the correct lowest position.  This creates a timing problem.

	This code is legacy code anyyway, left over from before KHTML
	understood about overflow.  The HTML should not be resizing itself
	to enclose positioned content or floats.  They should just spill
	out of the HTML object, so the fix is easy: kill the legacy code.
	
	There's a second fix required as well, which is to make the canvas
	avoid scanning its positioned objects list when computing its
	lowest and rightmost position.  Fixed positioned objects can't
	be scrolled, so it's incorrect to show scrollbars because of
	fixed positioned objects (since they are locked to the viewport).
	
        Reviewed by darin/gramps

        * khtml/rendering/render_block.cpp:

2003-05-11  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3242493 -- loop in khtml::RenderLayer::RenderZTreeNode at google cached copy of epower2go.biz page

        * khtml/rendering/render_layer.cpp: (RenderLayer::RenderZTreeNode::detach):
        Use an iterative algorithm rather than a recursive one to destroy the child
        nodes at each level of the tree, so our recursion is O(depth of tree) rather
        than O(size of tree).

2003-05-10  David Hyatt  <hyatt@apple.com>

	Fix the misrendering at the top of cnn.com (the extra tearing
	by the Google logo on the front page of cnn).  

	I am reducing the intrinsic margins of text fields down to 2px 
	to match buttons and selects.

	This is easily sufficient distance to avoid focus ring overlap and
	still looks nice, e.g., on www.google.com and amazon.com.
	
        Reviewed by mjs

        * khtml/rendering/render_form.h:

2003-05-10  David Hyatt  <hyatt@apple.com>

	A refinement of our intrinsic margin rules for form controls.
	Rather than always applying the intrinsic margin to form controls,
	this patch makes the application conditional.

	If the Web page explicitly specifies a width on a form control,
	the form control will honor that precise pixel-width and will not
	apply left/right intrinsic margins.  If a Web page specifies margins
	that the control should use, then the control will honor those
	margins.  The same rules apply for height and top/bottom margins.

        Reviewed by mjs

        * khtml/css/html4.css:
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcReplacedWidth):
        (RenderBox::calcReplacedHeight):
        * khtml/rendering/render_form.cpp:
        (RenderFormElement::addIntrinsicMarginsIfNeeded):
        (RenderFormElement::setStyle):
        * khtml/rendering/render_form.h:

2003-05-10  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3206695 -- Safari puts all of the mailto form content in email subject line, should put content in body

        The bug was caused by our KURL class not parsing the query out of the mailto URL properly.

        * kwq/KWQKURL.h: Removed parameter from prettyURL, unused in KHTML.
        * kwq/KWQKURL.mm:
        (KURL::prettyURL): Removed parameter, unused in KHTML.
        (KURL::parse): Parse queries even from non-hierarchical URLs. This fixes the bug.

        * WebCore-tests.exp: Updated for parameter removed from prettyURL.
        * WebCore-combined.exp: Regenerated.

2003-05-09  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3131026 -- half-width yen character (x5C) shows up as a backslash

        To fix this, I had to reverse our previous decoding approach for the characters
        that are different in Shift-JIS and ASCII. Before, we would decode them as
        ASCII, and so they would be wrong in web pages, but right in URLs. Now, I decode
        them as Shift-JIS, so they are right for web pages. This does not break URLs,
        though, because back in February we added code to re-encode characters for URLs
        to fix bug 3124596. But there is a TEC bug we have to work around to make this
        work right for the tilde character.

        * kwq/KWQTextCodec.mm:
        (QTextCodec::fromUnicode): Work around the TEC bug that prevents the tilde
        character from surviving the round trip through the decoding process by explicitly
        changing decoded tildes back to ASCII tildes.
        (KWQTextDecoder::convertUsingTEC): Do not set kUnicodeForceASCIIRangeMask.

        * kwq/KWQCString.h: Added replace call for use by new code. Some other
        small improvements.
        * kwq/KWQCString.mm:
        (QCString::contains): Make this faster by not doing the case-insensitive
        and case-sensitive cases both in the same loop.
        (QCString::append): Changed the += calls to this name, and made the
        += operator override call these.
        (QCString::replace): Added.

        * WebCore-tests.exp: Changed to export append calls.
        * WebCore-combined.exp: Regenerated.

2003-05-09  David Hyatt  <hyatt@apple.com>

	Finally get tables cutting the right properties off and letting
	the right ones through in quirks mode.  Font-family *is* inherited
	through into tables in all other browsers.  We have been doing this
	wrong the whole time.  Also ensure that font-style and font-variant
	are reset.
	
        Reviewed by darin

        * khtml/css/quirks.css:

2003-05-09  David Hyatt  <hyatt@apple.com>

	Always allow KONQ_TEXT as a valid value, and don't restrict its
	use to lax CSS parsing.  (We want our UA sheets to be parsed
	strictly.)

	Fixes bug 3224791, color inheritance not being properly cut off
	in tables in quirks mode.
	
        Reviewed by mjs and darin

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):

2003-05-09  David Hyatt  <hyatt@apple.com>

	Fix for 3253695, XML pages with <style>@import...</style> don't
	render.  The XML tokenizer is getting text in small chunks, and
	so it tries to load the sheet multiple times.  This fix patches
	the stylesheet code to properly decrement the loading sheet
	count when you abort a still-loading @import.
	
        Reviewed by darin

        * khtml/html/html_headimpl.cpp:
        (HTMLStyleElementImpl::childrenChanged):

2003-05-09  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3191943 -- XML parsing error occurs when loading shift-JIS Japanese XML file

        * khtml/misc/decoder.h: Add a new type of encoding, EncodingFromXMLHeader.
        * khtml/misc/decoder.cpp:
        (findXMLEncoding): Added.
        (Decoder::decode): Call findXMLEncoding to extract the encoding from the XML header.

2003-05-08  Darin Adler  <darin@apple.com>

        Reviewed by John and Ken.

	- fixed 3253461 -- stylesheet-reading code does not support BOM
	- fixed 3253359 -- XML parser does not allow UTF-8 BOM

        * kwq/KWQTextCodec.mm:
        (KWQTextDecoder::KWQTextDecoder): Initialize the new _littleEndian, _atStart,
        and _numBufferedBytes fields, not the old _flags, _state, and _haveBufferedByte fields.
        (KWQTextDecoder::convertUTF16): Moved the BOM-based endianness detection out of here;
        now done in toUnicode. Switched to use the new multibyte buffer, even though we only
        need one byte of it. Remove any BOM characters encountered within the text.
        (KWQTextDecoder::convertUsingTEC): Remove any BOM characters encountered within the text.
        (KWQTextDecoder::toUnicode): Do all the BOM detection at this level, including the
        UTF-8 BOM as well as the UTF-16 BOM.

        * khtml/misc/decoder.cpp: (Decoder::decode): Don't bother stripping the UTF-8 BOM.
        The QTextCodec object handles that now.

        * kwq/KWQXmlSimpleReader.mm: (QXmlSimpleReader::parse): Pass in the data in 16-bit character
        form, and specify the encoding when creating the parser. Both expat and KHTML
        want to do the decoding, so this is really just a way to get expat to back off.

2003-05-08  David Hyatt  <hyatt@apple.com>

	Fix the definition of isRoot() so that it doesn't depend on
	the object being in the render tree yet (and to avoid any
	virtual function calls as well).

	Make sure that requiresLayer() returns true if the object is
	the root.  This way the layer isn't destroyed when you e.g.,
	hit Cmd+ to increase font size.  

	This fixes bug 3252496.
	
        Reviewed by rjw

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        * khtml/rendering/render_object.cpp:
        (RenderObject::isRoot):
        * khtml/rendering/render_object.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::createRenderer):

2003-05-08  David Hyatt  <hyatt@apple.com>

	Background-position-x and y should be length|percentage.  Number
	is not a valid option.  Need to remove this so that the quirk will
	kick in that translates numbers to pixels.  Fixes an issue on
	diveintomark's list.
	
        Reviewed by darin

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):

2003-05-08  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed part of the cause of 3251979 -- switching tabs hoses page layout

        * kwq/WebCoreSettings.mm: (-[WebCoreSettings _updateAllViews]): Only update views that are
        using this settings object. The old way would result in re-laying out all views every time
        you created a new one.

2003-05-08  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed regression caused by my last check-in; need to use the KHTMLView layout function

        * kwq/KWQWidget.mm: (QWidget::setFocus): Use KHTMLView's layout instead of RenderCanvas's.

	- fixed 3251913 -- when form field has focus, dragging across text elsewhere does not select it

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::setSelection): Remove setFocusNode(0) call. Apparently not needed these days.
        I tested and everything works fine without it, and its side effect was the bug above.
        (DocumentImpl::setFocusNode): Remove clearSelection() call for similar reasons.

2003-05-08  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3251985 -- REGRESSION: tabbing doesn't scroll text fields into view any more

        * kwq/KWQTextField.h: Add a _hasFocus field, which prevents us from focusing
        multiple times.
        * kwq/KWQTextField.mm:
        (+[KWQTextField initialize]): Set KWQTextFieldCell as the cell class. We need a cell
        subclass to detect when editing begins.
        (-[KWQTextField setPasswordMode:]): Don't pass a QLineEdit to the secure text field
        when creating it. It's no longer needed.
        (-[KWQTextField controlTextDidEndEditing:]): Call setHasFocus:NO, and do the actual
        work in there.
        (-[KWQTextField control:textShouldBeginEditing:]): Remove the work that was done in
        here. This is only called when you actually start typing, so it's too late.
        (-[KWQTextField becomeFirstResponder]): Keep the code to forward first responder to
        the password field, but get rid of the rest, because this code path does not cover
        all the ways to start editing.
        (-[KWQTextField currentEditorForEitherField]): Moved this method inside the
        KWQInternal category.
        (-[KWQTextField selectedRange]): Ditto.
        (-[KWQTextField setSelectedRange:]): Ditto.
        (-[KWQTextField setHasFocus:]): Added. This method does all the work we want to do
        when we get focus and when we relinquish focus, including scrolling to make the field
        visible.
        (-[KWQTextFieldCell editWithFrame:inView:editor:delegate:event:]):
        Call setHasFocus:YES on the KWQTextField.
        (-[KWQTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]): Ditto.
        (+[KWQSecureTextField cellClass]): Use KWQSecureTextFieldCell as the cell class.
        We need a cell subclass to detect when editing begins and we can't use the normal
        technique because NSSecureTextField will raise an exception.
        (-[KWQSecureTextField nextKeyView]): Simplified to just call through to KWQTextField.
        (-[KWQSecureTextField previousKeyView]): Ditto.
        (-[KWQSecureTextField nextValidKeyView]): Ditto.
        (-[KWQSecureTextField previousValidKeyView]): Ditto.
        (-[KWQSecureTextField widget]): Ditto.
        (-[KWQSecureTextField fieldEditorDidMouseDown:]): Ditto.
        (-[KWQSecureTextFieldCell editWithFrame:inView:editor:delegate:event:]):
        Call setHasFocus:YES on the KWQTextField.
        (-[KWQSecureTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]): Ditto.
        
        * kwq/KWQWidget.mm: (QWidget::setFocus): Do a layout before positioning the widget.
        The code dealt with calls after a layout and before a draw, before, but not calls
        before a layout.

2003-05-08  David Hyatt  <hyatt@apple.com>

	Fix for a problem where positioned/floating children with
	percentage width tables inside them  don't expand to fill 
	the width of their containing block.  

	The way to solve this is to detect this
	case and treat the block as though it has an infinite maxwidth.

	Note that this is a quirk only, since doing this for real would
	be crazy.  We're basically just matching broken WinIE behavior.
	
        Reviewed by kocienda

        * khtml/rendering/render_block.cpp:

=== Safari-78 ===

2003-05-08  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3174769 -- Safari doesn't ignore byte order mark at start of UTF-8 HTML document

        * khtml/misc/decoder.cpp: (Decoder::decode): Added handling of the UTF-8 BOM
        to the code that already handled the UTF-16 BOM.

2003-05-06  David Hyatt  <hyatt@apple.com>

	The purpose of this patch is to unify XML and HTML documents' root
	element handling.  Instead of having a special RenderHTML object
	for dealing with <html>, root element handling is now done in
	base classes so that it works with XML documents as well.

	The changes include:
	  * Rename RenderRoot to RenderCanvas to more accurately
	    reflect what this RenderObject represents in CSS2.
	  * Rename root() to canvas()
	  * Rename isHtml() to isRoot()
	  * Rename isRoot() to isCanvas().
	  * Eliminate RenderHTML and fold its functionality into base
	    classes (RenderBlock and RenderBox).
	  * isRoot() now means "are you the RenderObject for the root
	    element".  All isHtml() callers now say isRoot() instead.
	  
        Reviewed by gramps

        * ForwardingHeaders/rendering/render_canvas.h: Added.
        * ForwardingHeaders/rendering/render_html.h: Removed.
        * ForwardingHeaders/rendering/render_root.h: Removed.
        * WebCore.pbproj/project.pbxproj:
        * khtml/ecma/kjs_dom.cpp:
        * khtml/ecma/kjs_window.cpp:
        * khtml/html/html_baseimpl.cpp:
        (HTMLHtmlElementImpl::id):
        * khtml/html/html_baseimpl.h:
        * khtml/khtmlview.cpp:
        (KHTMLView::layout):
        (KHTMLView::print):
        (KHTMLView::slotPaletteChanged):
        (KHTMLView::paint):
        (KHTMLView::timerEvent):
        * khtml/khtmlview.h:
        * khtml/rendering/render_applet.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_body.cpp:
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        (RenderBox::paintRootBoxDecorations):
        (RenderBox::paintBoxDecorations):
        (RenderBox::paintBackgroundExtended):
        (RenderBox::containingBlockWidth):
        (RenderBox::repaint):
        (RenderBox::calcHeight):
        (RenderBox::availableHeight):
        (RenderBox::calcAbsoluteVertical):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_canvas.cpp: Added.
        (RenderCanvas::RenderCanvas):
        (RenderCanvas::~RenderCanvas):
        (RenderCanvas::calcHeight):
        (RenderCanvas::calcWidth):
        (RenderCanvas::calcMinMaxWidth):
        * khtml/rendering/render_canvas.h: Added.
        * khtml/rendering/render_container.cpp:
        (RenderContainer::removeChildNode):
        * khtml/rendering/render_flow.cpp:
        * khtml/rendering/render_frames.cpp:
        (RenderFrameSet::layout):
        (RenderFrameSet::userResize):
        * khtml/rendering/render_html.cpp: Removed.
        * khtml/rendering/render_html.h: Removed.
        * khtml/rendering/render_image.cpp:
        (RenderImage::paintObject):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::enclosingPositionedAncestor):
        (RenderLayer::convertToLayerCoords):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_line.cpp:
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::paintObject):
        * khtml/rendering/render_object.cpp:
        (RenderObject::containingBlock):
        (RenderObject::canvas):
        (RenderObject::container):
        (RenderObject::removeFromObjectLists):
        (RenderObject::detach):
        (RenderObject::nodeAtPoint):
        (RenderObject::scheduleRelayout):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        * khtml/rendering/render_root.cpp: Removed.
        * khtml/rendering/render_root.h: Removed.
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):
        * khtml/rendering/render_text.cpp:
        (RenderText::paintObject):
        * khtml/rendering/table_layout.cpp:
        (shouldScaleColumns):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::attach):
        (DocumentImpl::setSelection):
        (DocumentImpl::clearSelection):
        (DocumentImpl::prepareMouseEvent):
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::createRenderer):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::rendererIsNeeded):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::adjustPageHeight):
        (KWQKHTMLPart::forceLayoutForPageWidth):
        (KWQKHTMLPart::selectionRect):
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge _setupRootForPrinting:]):

2003-05-07  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3127927 -- web view should not use primary selection color when it's not first responder

        * kwq/WebCoreBridge.h: Added usesInactiveTextBackgroundColor getter and setter.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge drawRect:]): Set the QPainter's usesInactiveTextBackgroundColor to match the
        value from the part.
        (-[WebCoreBridge selectionRect]): Fix nil-deref that happened in the no-KHTMLView case.
        (-[WebCoreBridge setUsesInactiveTextBackgroundColor:]): Added.
        (-[WebCoreBridge usesInactiveTextBackgroundColor]): Added.

        * kwq/KWQKHTMLPart.h: Added usesInactiveTextBackgroundColor, including getter and setter.
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): Initialize usesInactiveTextBackgroundColor.

        * kwq/KWQPainter.h: Added setUsesInactiveTextBackgroundColor and made selectedTextBackgroundColor
        a const member function, not a static one.
        * kwq/KWQPainter.mm:
        (QPainter::QPainter): Initialize _usesInactiveTextBackgroundColor to false.
        (QPainter::selectedTextBackgroundColor): Return secondarySelectedControlColor instead of
        selectedTextBackgroundColor if _usesInactiveTextBackgroundColor is true.

        * khtml/rendering/render_text.cpp: (TextRun::paintSelection): Call selectedTextBackgroundColor
        on the painter object; it's no longer a static member function.

        * khtml/rendering/render_root.cpp: (RenderRoot::selectionRect): Fix nil-deref that happened
        in the no-selection case.

2003-05-07  Vicki Murley  <vicki@apple.com>

        Reviewed by darin.

	- modify the Mixed build style to build optimized with symbols

        * WebCore.pbproj/project.pbxproj: removed OPTIMIZATION_CFLAGS, use WebCore.exp

2003-05-07  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3109258 -- Unicode above U+FFFF not handled correctly when expressed as numeric entities

        * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::parseEntity): Keep track of the entity in
        an unsigned integer that can hold 32 bits rather than a QChar. Convert to a pair of Unicode
        surrogate code points if necessary.
        
        * khtml/misc/stringit.h: Add a second pushed character, used for the case where we have a pair of
        surrogate characters for a single numeric entity.

        * khtml/html/htmltokenizer.h: Add missing DOM:: that was compiling only due to "using namespace DOM"
        in stringit.h. Replace EntityChar with EntityUnicodeValue.

2003-05-06  Darin Adler  <darin@apple.com>

        Reviewed by Chris.

	- fixed 3211756 -- form field contents on the left instead of right on page in RtL language

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::updateFromElement): Call setAlignment based on the style's direction.
        (RenderTextArea::updateFromElement): Ditto.
        * kwq/KWQLineEdit.h: Added setAlignment.
        * kwq/KWQLineEdit.mm: (QLineEdit::setAlignment): Added. Calls setAlignment on KWQTextField.
        * kwq/KWQTextArea.h: Added setAlignment.
        * kwq/KWQTextArea.mm: (-[KWQTextArea setAlignment:]): Added. Calls setAlignment on NSTextView.
        * kwq/KWQTextEdit.h: Added setAlignment.
        * kwq/KWQTextEdit.mm: (QTextEdit::setAlignment): Added. Calls setAlignment on KWQTextField.
        * kwq/KWQTextField.mm: (-[KWQTextField setAlignment:]): Added. Call setAlignment on secure
        text field too.

	- fixed 3250538 -- on pages labeled "US-ASCII", non-ASCII chars are not decoded as Latin-1
          as in other browsers

        * kwq/KWQTextCodec.mm:
        (effectiveEncoding): Added. Maps ISO Latin-1 and US-ASCII to Windows Latin-1.
        (QTextCodec::fromUnicode): Use effectiveEncoding.
        (KWQTextDecoder::convertUsingTEC): Use effectiveEncoding.

        - other changes

        * kwq/KWQCharsets.mm: (buildDictionaries): Make the first encoding in the file win for
        purposes of deciding which name is used. I thought this was happening before, but actually
        the last one was winning. Do this by using CFDictionaryAddValue, which does nothing if
        there's already a dictionary entry, instead of CFDictionarySetValue, which replaces.

2003-05-06  David Hyatt  <hyatt@apple.com>

	Make negative z-index content paint above the background of
	the stacking context element that encloses it.  This fixes
	gettyimages.com and hotwired.com.
	
        Reviewed by kocienda

        * khtml/css/html4.css:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_inline.cpp:
        (RenderInline::paintObject):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):
        (RenderLayer::nodeAtPoint):
        (RenderLayer::RenderZTreeNode::constructLayerList):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_root.cpp:
        * khtml/rendering/render_table.cpp:
        (RenderTable::paint):
        * kwq/KWQRenderTreeDebug.cpp:
        (write):

2003-05-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3245048 - "Block Pop-Up Windows" can easily be bypassed using javascript: URLs

	Closed the loophole by tracking what client redirects were
	triggered by user actions, and making sure the script interpreter
	knows.

        * khtml/ecma/kjs_window.cpp:
        (Window::put):
        (WindowFunc::tryCall):
        (Location::put):
        (LocationFunc::tryCall):
        * khtml/khtml_part.cpp:
        (KHTMLPart::executeScript):
        (KHTMLPart::clear):
        (KHTMLPart::scheduleRedirection):
        (KHTMLPart::slotRedirect):
        (KHTMLPart::urlSelected):
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]):

2003-05-06  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - used ObjectAlloc to find large numbers of allocations on startup and get rid of some

        * kwq/KWQColor.mm: (QColor::getNSColor): Keep a cache of 32 colors instead of returning a new
        one each time. Also use special cases for black and white.

2003-05-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 3241065 - popcap.com doesn't work in Safari, window.scrollBy fails to work in onLoad

	Make sure to do a layout before accessing any window properties or
	calling any window functions that require a layout to work
	properly.

        * khtml/ecma/kjs_window.cpp:
        (Window::get):
        (WindowFunc::tryCall):
        (Window::updateLayout):
        * khtml/ecma/kjs_window.h:

2003-05-05  David Hyatt  <hyatt@apple.com>

	Fix for 3247722. Make sure the grammar accepts properties with
	no values as declarations (albeit bad ones).
	
        Reviewed by darin

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:

2003-05-05  David Hyatt  <hyatt@apple.com>

	Fix for 3248587.  Refine the crash fix for generated image
	content so that we still set the image's intrinsic width
	and height properly.
	
        Reviewed by john

        * khtml/rendering/render_image.cpp:
        (RenderImage::setPixmap):

2003-05-04  David Hyatt  <hyatt@apple.com>

	When using the content property in CSS, you can string together
	an intermixed list of strings and image URLs.  The old code
	only supported a single image URL, and if you tried to mix
	text in with images, you ended up crashing.

	The crash bug is 3248172.  The fix is to maintain a list of
	ContentData objects instead of just a single object and to
	ensure that a whole list of generated content gets made (and
	not just a single RenderObject).
	
        Reviewed by john

        * khtml/css/cssstyleselector.cpp:
	(applyRule)
        * khtml/rendering/render_container.cpp:
        (RenderContainer::insertPseudoChild):
        * khtml/rendering/render_image.cpp:
        (RenderImage::setStyle):
        (RenderImage::setContentObject):
        (RenderImage::updateFromElement):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_style.cpp:
        (RenderStyle::setContent):
        (ContentData::clearContent):
        * khtml/rendering/render_style.h:

2003-05-05  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed replaceOccurrencesOfString crash reported in bug 3247249 (not what the bug is about)

        * kwq/KWQTextArea.mm: (-[KWQTextArea text]): Use the length of the replaced text.

2003-05-04  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3131534 -- "javascript:window.open()" leads to page not found error

        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): For open() calls, if the
        first parameter is not present, use "" instead of "undefined" as the URL.

	- fixed 3244766 -- window.open() doesn't position window correctly along the y axis

        * kwq/KWQKHTMLPartBrowserExtension.mm: (KHTMLPartBrowserExtension::createNewWindow):
        Fixed the code that flips the y coordinate to take the window height into account.

2003-05-03  David Hyatt  <hyatt@apple.com>

	Add smallCaps boolean to the string drawing and measuring
	routines.  WebCore should be done after this patch, with
	the rest of the work being done entirely in WebKit.
	
        Reviewed by darin

        * khtml/rendering/font.cpp:
        (Font::drawText):
        (Font::floatWidth):
        (Font::floatCharacterWidths):
        (Font::width):
        * kwq/KWQFontMetrics.h:
        * kwq/KWQFontMetrics.mm:
        (QFontMetrics::width):
        (QFontMetrics::floatWidth):
        (QFontMetrics::floatCharacterWidths):
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::drawText):
        * kwq/WebCoreTextRenderer.h:

2003-05-03  David Hyatt  <hyatt@apple.com>

	Rename layouted to needsLayout.  Add a layoutIfNeeded method
	and start using it in places that do if (needsLayout()) layout();
	
        Reviewed by kocienda

        * khtml/ecma/kjs_dom.cpp:
        (DOMNode::getValueProperty):
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameSetElementImpl::recalcStyle):
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::close):
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::width):
        (HTMLImageElementImpl::height):
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::parseAttribute):
        * khtml/khtmlview.cpp:
        (KHTMLView::layout):
        (KHTMLView::print):
        (KHTMLView::timerEvent):
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_applet.cpp:
        (RenderApplet::layout):
        (RenderEmptyApplet::layout):
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_box.cpp:
        (RenderBox::close):
        * khtml/rendering/render_container.cpp:
        (RenderContainer::addChild):
        (RenderContainer::removeChildNode):
        (RenderContainer::removeChild):
        (RenderContainer::appendChildNode):
        (RenderContainer::insertChildNode):
        (RenderContainer::layout):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_form.cpp:
        (RenderFormElement::layout):
        (RenderSubmitButton::updateFromElement):
        (RenderSelect::updateFromElement):
        (RenderSelect::calcMinMaxWidth):
        (RenderSelect::layout):
        * khtml/rendering/render_frames.cpp:
        (RenderFrameSet::layout):
        (RenderFrameSet::positionFrames):
        (RenderFrameSet::userResize):
        (RenderFrameSet::canResize):
        (RenderPart::setWidget):
        (RenderPartObject::updateWidget):
        (RenderPartObject::layout):
        * khtml/rendering/render_image.cpp:
        (RenderImage::setPixmap):
        (RenderImage::layout):
        * khtml/rendering/render_inline.cpp:
        (RenderInline::addChildToFlow):
        (RenderInline::splitInlines):
        (RenderInline::splitFlow):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::checkScrollbarsAfterLayout):
        * khtml/rendering/render_list.cpp:
        (RenderListItem::layout):
        (RenderListMarker::setStyle):
        (RenderListMarker::layout):
        (RenderListMarker::setPixmap):
        * khtml/rendering/render_object.cpp:
        (RenderObject::RenderObject):
        (RenderObject::setNeedsLayout):
        (RenderObject::information):
        (RenderObject::dump):
        (RenderObject::setStyle):
        (RenderObject::invalidateLayout):
        (RenderObject::detach):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::paint):
        (RenderWidget::setQWidget):
        (RenderWidget::layout):
        * khtml/rendering/render_root.cpp:
        * khtml/rendering/render_table.cpp:
        (RenderTable::addChild):
        (RenderTable::layout):
        (RenderTable::paint):
        (RenderTable::close):
        (RenderTable::splitColumn):
        (RenderTable::appendColumn):
        (RenderTable::recalcSections):
        (RenderTableSection::addChild):
        (RenderTableSection::setCellWidths):
        (RenderTableSection::layoutRows):
        (RenderTableSection::recalcCells):
        (RenderTableRow::addChild):
        (RenderTableRow::layout):
        (RenderTableCell::paint):
        * khtml/rendering/render_text.cpp:
        (RenderText::setText):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::recalcStyle):
        (DocumentImpl::updateStyleSelector):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::insertBefore):
        (NodeBaseImpl::replaceChild):
        (NodeBaseImpl::appendChild):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::forceLayoutForPageWidth):
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge needsLayout]):

2003-05-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- reformatted method prototypes to match AppKit style

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreDOMPrivate.h:
        * kwq/WebCoreHistory.h:
        * kwq/WebCoreResourceLoader.h:
        * kwq/WebCoreTextRenderer.h:
        * kwq/WebDOMDocument.h:
        * kwq/WebDOMElement.h:
        * kwq/WebDOMNode.h:

2003-05-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 2936175 - MALLORY: please implement onResize

        * khtml/khtmlview.cpp:
        (KHTMLView::resizeEvent): Put most of this in #if !APPLE_CHANGES,
	since we already do the relayout and such on resize elswhere.
        * kwq/KWQEvent.h: Add a minimal QResizeEvent.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::sendResizeEvent): Send it to the view.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge sendResizeEvent]): Send it to the part.

2003-05-02  David Hyatt  <hyatt@apple.com>

	Fix for 3184113, bottom margins didn't collapse with their children
	like they were supposed to.  The problem is fixed by separately
	caching whether or not the top and bottom margins can collapse
	with their kids instead of having one global canCollapse variable.
	
        Reviewed by kocienda

        * khtml/rendering/render_block.cpp:

2003-05-02  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3236383 -- http://www.xy.com/ exception, crash loading main page

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scheduleClose): Change to use closeWindowSoon, so that
        the delay is on the WebKit side so it can be tied to the WebView as a whole, not a particular bridge.

        * kwq/WebCoreBridge.h: Replaced closeWindow with closeWindowSoon.

        - rolled in a couple of harmless and eventually-possibly-useful changes inspired by changes
          OmniGroup made in their copy of WebCore

        * kwq/KWQListBox.mm: Make KWQTableView a KWQWidgetHolder.
        (-[KWQTableView widget]): Return the widget.
        * kwq/KWQScrollView.mm: (QScrollView::ensureVisible): First cut at implementing these.

2003-05-02  David Hyatt  <hyatt@apple.com>

	Make sure that recalcSections always clears out the needSectionRecalc
	boolean, even in the case where it finds column elements.

	Fixes the assert outlined in bug 3237651.
	
        Reviewed by john

        * khtml/rendering/render_table.cpp:
        (RenderTable::recalcSections):

2003-05-01  David Hyatt  <hyatt@apple.com>

	Fix for 3226030, percentage height tables inside table cells
	don't grow to fill the space inside the cell.  There was
	a missing edge case here for the case where the table was
	nested inside a table cell.
	
        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):

2003-05-01  David Hyatt  <hyatt@apple.com>

	Add a cycle check when importing stylesheets to prevent
	infinite loops.
	
        Reviewed by john

        * khtml/css/css_ruleimpl.cpp:
        (CSSImportRuleImpl::init):

2003-05-01  David Hyatt  <hyatt@apple.com>

	Table rows don't know their precise dimensions, so repainting
	them fails.  For now, just make an invalidation of a table
	row due to CSS changes invalidate the whole table.

	This is what the old Safari table code used to do prior to the
	new table code landing.

	Fixes bug #3205092.
	
        Reviewed by darin/john

        * khtml/rendering/render_table.cpp:
        (RenderTableRow::repaint):
        * khtml/rendering/render_table.h:

2003-05-01  David Hyatt  <hyatt@apple.com>

	Fix for 3232637, don't let generated parentless image content
	try to do width/height/layout calculations.  It will do this
	all anyway, when it finally gets inserted into the rendering
	tree.
	
        Reviewed by john

        * khtml/rendering/render_image.cpp:
        (RenderImage::setPixmap):

2003-05-01  David Hyatt  <hyatt@apple.com>

	Fix for 3239404, a crash caused because a block-level :after
	element was being inserted as generated content inside an
	inline element.

	The fix is to mutate the display of the generated content to
	be inline when the parent of the generated content is also
	inline. 

	Section 12.1 of the CSS2 spec (at the very end of the spec)
	covers this special case.  Once we do the mutation it becomes
	impossible for generated content to cause a splitFlow, and so
	the crash is plugged.
	
        Reviewed by john

        * khtml/rendering/render_container.cpp:
        (RenderContainer::insertPseudoChild):

2003-05-01  David Hyatt  <hyatt@apple.com>

	Replace effectiveWidth and effectiveHeight with a 
	parameterized overflowWidth/Height, since this is much better
	terminology.

	Also fix event handling so that it no longer assumes (incorrectly)
	that being inside the overflow rect of an object means you are
	inside the object.  Now there are two separate checks, with the
	overflow check being used only to figure out if you should check
	inside your kids.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::repaint):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::repaint):
        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_table.h:

=== Safari-77 ===

2003-04-30  David Hyatt  <hyatt@apple.com>

	Fix for 3244157, giantrobot.com misrenders with a lot of
	vertical space.  Overflow heights were being miscomputed for
	overflow:auto blocks.
	
        Reviewed by gramps

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:

2003-04-30  David Hyatt  <hyatt@apple.com>

	Fix for 3210725, invalid n/a selector treated as valid.  This
	fix also makes the CSS1 test on the test suite for forward-compatible
	parsing completely pass (yay!), which was an issue on
	diveintomark's list.

        Reviewed by gramps

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:

2003-04-30  David Hyatt  <hyatt@apple.com>

	Fixes for 3227983 and 3224521, both bugs involving bad letter-spacing
	property values.  This fixes all Movable Type blogs that had this
	error in their stylesheets.
	
        Reviewed by gramps

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:

2003-04-30  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3233819 -- MALLORY: onChange handler being called on SELECT even if selected item does not change

        * kwq/KWQComboBox.h: Added _currentItem variable, updateCurrentItem function, and replaced
        activated function with itemSelected function.
        
        * kwq/KWQComboBox.mm:
        (QComboBox::QComboBox): Call updateCurrentItem so _currentItem is up to date.
        (QComboBox::insertItem): Ditto.
        (QComboBox::clear): Ditto.
        (QComboBox::setCurrentItem): Ditto.
        (QComboBox::updateCurrentItem): Added. Returns true if current item has changed since the last time
        the function was called.
        (QComboBox::itemSelected): Only send the activate method if updateCurrentItem returns true.
        (-[KWQComboBoxAdapter action:]): Call itemSelected instead of calling activated directly.

2003-04-29  David Hyatt  <hyatt@apple.com>

	Fix for the Adam Rice float/padding test on diveintomark's list
	of bugs.  We weren't adding in the parent's border/padding in
	one case in the clearFloats function, which resulted in the
	float being incorrectly positioned.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:

2003-04-29  David Hyatt  <hyatt@apple.com>

	This patch fixes the following bugs:

	(1) 3186174 - padding-left improperly applied to list items.
	The fix is in render_list.cpp and involves adding in the
	list item's border and padding so that outside markers end up
	outside the border box instead of just inside the padding box.

	(2) 3239571 - a stray !important after a ; causes the CSS parser
	to choke.  This patch adds a rule to parser.y to deal with
	!importants found in between property values and to just ignore
	them.

	(3) 3170647 - positioned boxes with auto widths ended up adding
	in their border/padding twice!  Make sure that when 
	calcAbsoluteHorizontal in render_box.cpp examines m_maxWidth that
	it subtracts out the border and padding and looks at content width.

	(4) 3186165 - Negative padding values were being incorrectly
	honored by Safari.  A patch to css_styleselector.cpp checks to
	see if the value specified by the rule is negative, and if so
	the rule is not applied.

	(5) 3132172 - The clip property could not be accessed via script
	because the cssText routine for CSS_RECT primitive values had
	not been implemented.  In css_valueimpl.cpp this code has now been
	filled in.
	
        Reviewed by mjs

        * khtml/css/css_valueimpl.cpp:
        (CSSPrimitiveValueImpl::cssText):
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/parser.cpp:
        * khtml/css/parser.y:
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcAbsoluteHorizontal):
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::paintObject):

2003-04-29  David Hyatt  <hyatt@apple.com>

	Fix for 3226138, crash on canada.gc.ca.  Make sure a failed
	@media parse doesn't crash by adding a null check.
	
        Reviewed by mjs

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:

2003-04-29  David Hyatt  <hyatt@apple.com>

	The remainder of the overflow:auto patch.

	A minor table cell optimization has also been included.

	Also fixing one of rjw's inline table bugs.  Inline tables
	didn't clear their minmaxwidth bool when contents inside them
	changed size.
	
	r=mjs/gramps on overflow:auto stuff
	r=rjw on the table stuff

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::parseAttribute):
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::checkScrollbarsAfterLayout):
        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_table.cpp:
        (RenderTableCell::layout):
        * khtml/rendering/render_table.h:

2003-04-29  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3234633 -- page with moderately deep tag nesting causes crash when closed (www.4strokenationals.com)

        * khtml/xml/dom_nodeimpl.cpp: (NodeBaseImpl::~NodeBaseImpl): Avoid recursion by using a global
        list of child nodes to destroy and only doing the actual destruction at the top level.

2003-04-29  Darin Adler  <darin@apple.com>

        Mostly reviewed by Ken, some bits reviewed by John.

	- fixed 3188781 -- eliminate globally initialized objects from WebCore

        * kwq/KWQString.h: Change QChar::null to be a char constant, and QString::null to be a const char *.
        In the cases where the code still compiles after these changes, everything works fine. A few cases
        that didn't compile are fixed below.
        * kwq/KWQString.mm: Remove QString::null.
        (QString::mid): Return QString() instead of null.
        * kwq/KWQChar.mm: Remove the definition of QChar::null.

        * khtml/css/css_base.cpp: (CSSSelector::extractPseudoType): Use DOMString explicitly in one place
        where the code said QString::null. The trick where QString::null is really a const char * does not
        work in this case.
        * khtml/khtml_part.cpp: (KHTMLPart::reparseConfiguration): Use QString() instead of QString::null
        in one place. The trick where QString::null is really a const char * does not work in this case.
        * kwq/KWQKHTMLSettings.h: Use QString() for settingsToCSS, the trick where QString::null is really
        a const char * does not work in this case.
        * khtml/rendering/render_list.cpp: (RenderListMarker::paintObject): Use an isEmpty check here instead
        of comparing with QString::null. Not sure this change was strictly required, but it is simpler and
        may also make the code slightly faster.

        * kwq/KWQKFileDialog.h: Removed. This used QString::null in a way that is incompatible with the new
        "0" hack, but was not used any more.
        * kwq/KWQKFileDialog.mm: Removed.
        * ForwardingHeaders/kfiledialog.h: Empty this out, since there is no KWQKFileDialog.h any more.
        * WebCore.pbproj/project.pbxproj: Removed KWQKFileDialog.h and .mm.
       
        * khtml/html/htmltokenizer.cpp: Change the commentStart global array to be an array of char instead
        of QChar to avoid the static constructor; the code works fine with char anyway.
        * khtml/html/html_formimpl.cpp: Change the global constants in this file to be char instead of QChar.
        It works this way (and faster for KWQ), and avoids the static constructor.

        * khtml/rendering/bidi.h: Change BidiIterator from a class with constructors into a plain struct.
        The copy construct and assignment operator weren't needed anyway since they simply duplicated default
        assignment, and if we have a constructor then we can't use it as a global object, since we want to
        avoid static constructors. Do the same with BidiStatus, and also stop using bit fields. It's silly to
        use bit fields for something when we have only one global instance of it; just makes extra code size
        and saves a few bytes.
        * khtml/rendering/bidi.cpp:
        (BidiIterator::current): Move the non-breaking space global inside this function.
        (appendRunsForObject): Initialize BidiIterator object using brace notation.
        (buildCompactRuns): Initialize BidiIterator objects using brace notation and assignment.
        (RenderBlock::layoutInlineChildren): Initialize BidiStatus fields separately. Initialize BidiIterator
        objects using brace notation and assignment.
        (RenderBlock::findNextLineBreak): Initialize BidiIterator objects using brace notation and assignment.

        * khtml/rendering/render_frames.cpp: Removed an include of <iostream.h>. This pulled the entire
        C++ I/O library in, with lots of static constructors. Elsewhere, we are careful not to use the C++
        I/O library in WebCore except in Development versions. And this file didn't actually use the library,
        just included the header.

        * kwq/KWQNamespace.h: Remove all the color globals except for the ones used in KHTML: black, white,
        darkGray, gray, and lightGray. And for those, make the globals RGB constants instead of QColor objects.
        This gets rid of the global objects with constructors and works without any KHTML code changes.
        * kwq/KWQColor.mm: Remove the definition of the QColor constants from the Qt class.

        * kwq/KWQPainter.h: Add overloads for setPen and setBrush so they work with the "color" constants
        from Qt that are now RGB constants rather than QColor objects.
        * kwq/KWQPainter.mm:
        (QPainter::setPen): Set style to solid line and width to 0 when the parameter is an RGB constant.
        This is just like what you'd get if you constructed a QPen.
        (QPainter::setBrush): Set style to solid pattern when the parameter is an RGB constant.
        This is just like what you'd get if you constructed a QBrush.
        
        * khtml/misc/loader.h: Change m_LRULists to be a global pointer instead of a global array, so
        we don't have to statically construct LRUList objects.
        * khtml/misc/loader.cpp: (Cache::getLRUListFor): Allocate the global array the first time we
        pass through here.

2003-04-29  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3242460 -- crash in NSPopUpButtonCell at acheter-moins-cher.com

        * kwq/KWQComboBox.mm: (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
        Defer QObject timers too as well as loading while tracking a pop-up.
        
        * kwq/KWQObject.h: Add defersTimers and setDefersTimers functions.
        * kwq/KWQObject.mm:
        (QObject::setDefersTimers): Added. When called with true starts deferring timers. When called
        with false schedules a "delay 0" task to deliver all the timers and stop deferring them.
        (-[KWQObjectTimerTarget sendTimerEvent]): Added. Contains guts of the old timerFired method.
        (-[KWQObjectTimerTarget timerFired]): Puts timer on the deferred timers list or calls sendTimerEvent.
        (+[KWQObjectTimerTarget stopDeferringTimers]): Remove timers items from the deferred timers list,
        and makes them fire, then stops deferring timers.

        * WebCore.pbproj/project.pbxproj: Reorder things a bit.

2003-04-29  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3230885 -- crash loading hixie test page in -[WebSubresourceClient connection:didReceiveData:]

        * khtml/rendering/render_style.cpp: (RenderStyle::setContent):
        Change code around so we don't deref the text object without checking
        the contentType. Also fix the leak of a DOMStringImpl in the case
        where we are asked to add a string, but the string pointer is 0.

2003-04-28  Richard Williamson  <rjw@apple.com>

        API changes from final review meeting.
        
        goBackOrForwardToItem: -> goToBackForwardItem:
        drop "Window" from WebUIDelegate method names.
        WebElementIsSelectedTextKey -> WebElementIsSelectedKey
        Cross-frame searchFor on WebView now public.
        
        Reviewed by Chris.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:

2003-04-28  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - re-fixed 3159076 -- turbotax.intuit.com forms have text fields instead of radio buttons

        * khtml/html/html_formimpl.cpp:  (HTMLInputElementImpl::attach): Only set the type
        if JavaScript hasn't set it explicitly already.

2003-04-25  David Hyatt  <hyatt@apple.com>

	Part two of the overflow patch.  This adds the scrollbars and
	patches the layers code, but it doesn't yet turn on the
	overflow:auto capability.
	
        Reviewed by mjs/gramps

        * ForwardingHeaders/qscrollbar.h: Added.
        * WebCore.pbproj/project.pbxproj:
        * khtml/ecma/kjs_dom.cpp:
        (DOMNode::getValueProperty):
        (DOMNode::putValue):
        * khtml/ecma/kjs_dom.h:
        * khtml/ecma/kjs_dom.lut.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::contentWidth):
        (RenderBox::repaintRectangle):
        (RenderBox::calcAbsoluteHorizontal):
        (RenderBox::calcAbsoluteVertical):
        (RenderBox::lowestPosition):
        * khtml/rendering/render_layer.cpp:
        (RenderScrollMediator::slotValueChanged):
        (RenderLayer::RenderLayer):
        (RenderLayer::~RenderLayer):
        (RenderLayer::updateLayerPosition):
        (RenderLayer::scrollOffset):
        (RenderLayer::subtractScrollOffset):
        (RenderLayer::scrollToOffset):
        (RenderLayer::updateScrollPositionFromScrollbars):
        (RenderLayer::setHasHorizontalScrollbar):
        (RenderLayer::setHasVerticalScrollbar):
        (RenderLayer::verticalScrollbarWidth):
        (RenderLayer::horizontalScrollbarHeight):
        (RenderLayer::moveScrollbarsAside):
        (RenderLayer::positionScrollbars):
        (RenderLayer::checkScrollbarsAfterLayout):
        (RenderLayer::paintScrollbars):
        (RenderLayer::paint):
        (RenderLayer::nodeAtPoint):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::clientWidth):
        (RenderObject::clientHeight):
        (RenderObject::scrollWidth):
        (RenderObject::scrollHeight):
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
        * kwq/KWQNamespace.h:
        * kwq/KWQScrollBar.h: Added.
        * kwq/KWQScrollBar.mm: Added.
        (-[KWQScrollBar initWithQScrollBar:]):
        (-[KWQScrollBar scroll:]):
        (:m_valueChanged):
        (QScrollBar::~QScrollBar):
        (QScrollBar::setValue):
        (QScrollBar::setSteps):
        (QScrollBar::setKnobProportion):
        (QScrollBar::scrollbarHit):
        (QScrollBar::valueChanged):
        * kwq/KWQSlot.mm:
        (KWQSlot::KWQSlot):
        (KWQSlot::call):

2003-04-24  David Hyatt  <hyatt@apple.com>

	Rename inQuirksMode to inCompatMode.  Drop uses of it in 
	the render tree code in favor of style()->htmlHacks().

	Remove dead code in the parser dealing with discarded attributes.

	Optimize bidi run justification by adding a guard.

	Fix :target to not match :root when no fragment ID is specified.
	
        Reviewed by mjs/gramps

        * khtml/css/cssstyleselector.cpp:
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseAttribute):
        * khtml/html/html_headimpl.cpp:
        (HTMLLinkElementImpl::setStyleSheet):
        (HTMLStyleElementImpl::childrenChanged):
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::createSharedCellDecls):
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::~KHTMLParser):
        (KHTMLParser::reset):
        (KHTMLParser::parseToken):
        (KHTMLParser::insertNode):
        * khtml/html/htmlparser.h:
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::parseTag):
        * khtml/khtml_part.cpp:
        (KHTMLPart::gotoAnchor):
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLineBoxDecorations):
        (RenderFlow::repaint):
        * khtml/rendering/render_inline.cpp:
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_list.cpp:
        (getParentOfFirstLineBox):
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        * khtml/rendering/render_text.cpp:
        (RenderText::paintObject):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        (DocumentImpl::recalcStyle):
        (DocumentImpl::recalcStyleSelector):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::createDecl):

2003-04-24  Darin Adler  <darin@apple.com>

        Reviewed by Chris.

        - fixed 3210096 -- server identifies page as UTF-8, page identifies itself as windows-1252, server must win
        - fixed 3105796 -- www.thai.com does not display with correct encoding (<body> tag in comment before <meta>)

        * khtml/khtml_part.cpp:
        (KHTMLPart::write): Pass in an EncodingType rather than just a boolean. This lets us tell
        the difference between EncodingFromHTTPHeader (which wins out over an encoding in a meta tag)
        and DefaultEncoding (which loses).
        (KHTMLPart::setEncoding): Put ifdef around the whole function. We use our own version in
        KWQKHTMLPart instead.
        
        * khtml/misc/decoder.h: Defined an EncodingType and changed the parameter to setEncoding to take
        it instead of force and 8-bit-only parameters. Store it in m_type and get rid of haveEncoding.
        * khtml/misc/decoder.cpp:
        (Decoder::Decoder): Set m_type to DefaultEncoding.
        (Decoder::setEncoding): Take a type parameter, instead of force and 8-bit-only parameters.
        Use "eight-bit-only" mode for EncodingFromMetaTag only. Fix code so we don't clobber an existing
        codec if we can't find a new one in a simpler way. Store the type in m_type, rather than using
        the confusing "haveEncoding" flag.
        (skipComment): Added. Used to skip comments found in the <head> section.
        (Decoder::decode): Moved the check for the UTF-16 BOM out and do that check even when we have
        an encoding (although not if we have one the user chose). Update check so that we look for a meta
        tag when we have nothing except a default encoding. This fixes the bug where we have an encoding
        from an HTTP header; in that case we do not want to look at the meta tag. Improve performance a bit
        by not constructing a string just so we can append the data. Merged the APPLE_CHANGES case a bit
        with the original case better. Added code to skip comments; this fixes the thai.com issue. Improved
        the code to handle data after the first buffer full. We now avoid putting data into a QString once
        we are past the header. Extended an APPLE_CHANGES ifdef to exclude more code we don't need.

        * kwq/KWQKHTMLPart.h: Added setEncoding and addData to replace slotData.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setEncoding): Added. Needs to be called only once and does the first-time work as
        well as setting up the encoding for the page. In practice it is called before each time addData is.
        (KWQKHTMLPart::addData): Added. Needs to be called for each run of data. Now just calls write(),
        but does some assertions, which is why I have not removed it and changed the bridge to call write().
        
        * kwq/WebCoreBridge.h: Replaced the old addData:withEncoding: and addData:withOverrideEncoding: with
        setEncoding:userChosen: and addData:.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setEncoding:userChosen:]): Call setEncoding on the part.
        (-[WebCoreBridge addData:]): Call addData on the part.

2003-04-24  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - improved the text encoding database

        * kwq/mac-encodings.txt: Changed to a new format. Now the first encoding name in every list
        is the "canonical" one and is in canonical case and punctuation (no longer requiring lowercase).
        Since the first is the one that will be used outgoing to send to servers, it's good to have
        that one in canonical form. All subsequent aliases in the list are now required to be all
        lowercase and not use any punctuation. Since the comparison is done ignoring non-alphanumeric
        characters, and ignoring case, this will have no effect on which encodings are recognized.
        
        * kwq/make-charset-table.pl: Updated to enforce the new format rules.

        * kwq/KWQCharsetData.c: Regenerated.

        * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData): Simplify the "change commas
        to spaces" code in a way that lets us get rid of APPLE_CHANGES. Use the official "ISO-8859-1"
        here instead of something almost, but not quite, like it.
        * kwq/KWQKCharsets.mm: (KCharsets::codecForName): Use the official "ISO-8859-1" here instead
        of the unofficial "latin1". Unimportant, but cleaner this way.

        - preparation for some text encoding changes to fix some bugs

        * kwq/KWQKHTMLSettings.h: Added an encoding value rather than always returning a hardcoded
        value. Other minor cleanup.
        * kwq/KWQKHTMLSettings.mm: Removed.
        * WebCore.pbproj/project.pbxproj: Removed KWQKHTMLSettings.mm.

        - other changes

        * kwq/KWQKHTMLPart.h: Removed "using" statement. Headers must not pollute the namespace
        by doing "using".
        * khtml/khtml_part.cpp: Added a "using" here.
        * kwq/KWQPageState.mm: Added a "using" here.
        
        * kwq/KWQString.h: Added an append that takes a const char * and length for use by the decoder.
        * kwq/KWQString.mm: (QString::append): Implemented it.

        * kwq/WebCoreSettings.h: Added default text encoding field and methods.
        * kwq/WebCoreSettings.mm:
        (-[WebCoreSettings dealloc]): Release defaultTextEncoding.
        (-[WebCoreSettings setDefaultTextEncoding:]): Added.
        (-[WebCoreSettings defaultTextEncoding]): Added.

=== Safari-75 ===

2003-04-24  John Sullivan  <sullivan@apple.com>

	- fixed 3151501 -- Toggling "Check Spelling As You Type" in a
	textarea should affect future textareas

        Reviewed by Darin

        * kwq/KWQTextArea.mm:
        (+[KWQTextAreaTextView _setContinuousSpellCheckingEnabledForNewTextAreas:]):
	new method, sets a static variable and an NSUserDefault
        (+[KWQTextAreaTextView _isContinuousSpellCheckingEnabledForNewTextAreas]):
	new method, checks a static variable, reading it from an NSUserDefault the
	first time
        (-[KWQTextAreaTextView initWithFrame:textContainer:]):
	override designated initializer to set continuous spell checking if appropriate
        (-[KWQTextAreaTextView setContinuousSpellCheckingEnabled:]):
	call _setContinuousSpellCheckingEnabledForNewTextAreas in addition to
	setting the value for this object

2003-04-23  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3237301 -- REGRESSION: text fields with size greater than maxlength are sized according to maxlength

        * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Override the maximum length
        for this operation.

	- fixed 3236961 -- setting innerHTML with input elements doesn't set up value properly

        To fix this, I rolled in the changes from the trunk of KHTML development that get rid of
        the init() function and do the work in either attach() or insertedIntoDocument() instead.

        * khtml/html/html_baseimpl.h: Removed init overrides, added insertedIntoDocument override.
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::insertedIntoDocument): Moved HTMLBodyElementImpl::init code here.
        (HTMLFrameElementImpl::attach): Moved HTMLFrameElementImpl::init code here.
        (HTMLFrameSetElementImpl::attach): Moved HTMLFrameSetElementImpl::init code here.

        * khtml/html/html_formimpl.h: Added m_inited flag, removed init overrides, removed unused
        m_encCharset field.
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::formData): Removed code that set m_encCharset.
        (HTMLFormElementImpl::setEnctype): Removed code that set m_encCharset.
        (HTMLInputElementImpl::HTMLInputElementImpl): Initialize m_inited to false.
        (HTMLInputElementImpl::attach): Moved HTMLInputElementImpl::init code here, guarded by
        m_inited.
        (HTMLSelectElementImpl::attach): Moved HTMLSelectElementImpl::init code here.
        (HTMLTextAreaElementImpl::attach): Moved HTMLTextAreaElementImpl::init code here.

        * khtml/xml/dom_nodeimpl.h: Removed init.
        * khtml/xml/dom_nodeimpl.cpp: Removed init.

        * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): Removed calls to init.
        * khtml/xml/xml_tokenizer.cpp:
        (XMLHandler::startElement): Removed call to init.
        (XMLHandler::startCDATA): Removed call to init.
        (XMLHandler::exitText): Removed call to init.

2003-04-22  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3158411 -- radio button groups are per-form in WebCore, per-page in other browsers (flyglobespan.com)

        * khtml/html/html_formimpl.h: Removed radioClicked. Made setName virtual and make
        HTMLInputElementImpl override it. Added isCheckedRadioButtonForDocument,
        addCheckedRadioButtonToDocument, and removeCheckedRadioButtonFromDocument.
        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::~HTMLInputElementImpl): Call removeCheckedRadioButtonFromDocument.
        (HTMLInputElementImpl::setType): Call removeCheckedRadioButtonFromDocument before changing
        the type and addCheckedRadioButtonToDocument after.
        (HTMLInputElementImpl::parseAttribute): Call removeCheckedRadioButtonFromDocument before changing
        ATTR_NAME and addCheckedRadioButtonToDocument after.
        (HTMLInputElementImpl::setChecked): Call removeCheckedRadioButtonFromDocument before changing
        the checked state and addCheckedRadioButtonToDocument after.
        (HTMLInputElementImpl::setName): Call removeCheckedRadioButtonFromDocument before changing
        the name and addCheckedRadioButtonToDocument after.
        (HTMLInputElementImpl::isCheckedRadioButtonForDocument): Added. Checks if this element should
        be the one known to the document.
        (HTMLInputElementImpl::addCheckedRadioButtonToDocument): Call addCheckedRadioButton on the
        document if isCheckedRadioButtonForDocument returns true.
        (HTMLInputElementImpl::removeCheckedRadioButtonFromDocument): Call
        removeCheckedRadioButtonFromDocument on the document if isCheckedRadioButtonForDocument
        returns true.
        
        * khtml/xml/dom_docimpl.h: Add addCheckedRadioButton, removeCheckedRadioButton, and
        m_checkedRadioButtons.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::addCheckedRadioButton): Uncheck the old radio button with this name, if any.
        Store the new radio button in the "checked radio buttons" map.
        (DocumentImpl::removeCheckedRadioButton): Remove the radio button from the map.

2003-04-22  Darin Adler  <darin@apple.com>

        * khtml/html/html_formimpl.h: Remove radioClicked.
        * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::setChecked): When unchecking other
        input elements with the same name, traverse the entire document, not just the form.

2003-04-22  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3144966 -- problems typing in form at http://www.mobile.att.net/messagecenter

        The bug was that doing a focus would always select the entire contents of the field.
        While this behavior does match Mozilla's behavior for text fields, it doesn't match
        WinIE; we're going to imitate WinIE and not do it. Also fix the same issue for text areas.

        * kwq/KWQTextField.h: Add lastSelectedRange field.
        * kwq/KWQTextField.mm:
        (-[KWQTextField initWithFrame:]): Initialize lastSelectedRange (to nothing).
        (-[KWQTextField initWithQLineEdit:]): Use [self init] instead of [super init]. The same
        thing, but you should never call [super xxx] where xxx is a non-designated initializer
        of the superclass.
        (-[KWQTextField currentEditorForEitherField]): Added. Returns the current editor of either
        the text field or the secure text field.
        (-[KWQTextField selectedRange]): Added.
        (-[KWQTextField setSelectedRange:]): Added.
        (-[KWQTextField controlTextDidEndEditing:]): Store the selected text range in the
        lastSelectedRange variable, so it can be used later. Also move the code that sends the
        FocusOut event here.
        (-[KWQTextField control:textShouldBeginEditing:]): Do the "scroll frame into view" here
        isntead of in becomeFirstResponder so it can be shared.
        (-[KWQTextField control:textShouldEndEditing:]): Moved FocusOut to controlTextDidEndEditing:.
        (-[KWQTextField didBecomeFirstResponder]): Added. Sets the selected range back to what it
        was in textShouldEndEditing, but only if we are not tabbing into the field. If we don't set
        the selected range, then we inherit the behavior from NSTextField, all text selected.
        We can't do the selected range work in textDidEndEditing because that's called too early.
        (-[KWQTextField becomeFirstResponder]): Call didBecomeFirstResponder.
        (-[KWQSecureTextField currentEditorForSecureField]): Added. Factored out of selectText:.
        (-[KWQSecureTextField selectText:]): Use currentEditorForSecureField for clarity.
        (-[KWQSecureTextField becomeFirstResponder]): Call didBecomeFirstResponder.

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _createTextView]): Rearrange a bit.
        (-[KWQTextArea setWordWrap:]): Ditto.
        (-[KWQTextAreaTextView becomeFirstResponder]): Only do the selectAll: operation here
        if we are tabbing into the field. Otherwise keep the selection from last time.
        
        * khtml/rendering/render_form.cpp: (RenderTextArea::updateFromElement): Don't do the
        whole "save cursor position, set text, restore cursor position" dance for the case
        where the field already has the correct contents. Without this change, selections can be
        collapsed to an insertion point at the start of the selection at seemingly random times.
        
        * khtml/khtmlview.cpp: (KHTMLView::dispatchMouseEvent): Don't deselect the currently
        focused node on mouse down. This created a symptom where a text field would lose
        focus when you clicked on a button.
        
        * kwq/KWQLineEdit.h: Remove unused frame() method.
        * kwq/KWQLineEdit.mm: Remove unused, unimplemented frame() method.

2003-04-21  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed bug 3159076 -- turbotax.intuit.com forms have text fields instead of radio buttons

        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::setType): Implement; loosen rule about what type changes are allowed.
        (HTMLInputElementImpl::parseAttribute): Call setType for ATTR_TYPE.
        
        - unrelated tweak
        
        * kwq/KWQSlot.mm: (KWQSlot::KWQSlot): Use a macro here to make it a little easier to add items.

2003-04-21  Chris Blumenberg  <cblu@apple.com>

	Use renamed plug-in view methods.

        Reviewed by john.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::createPart):
        * kwq/KWQKJavaAppletWidget.mm:
        (KJavaAppletWidget::showApplet):
        * kwq/WebCoreBridge.h:

2003-04-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3191892 - Popup blocking prevents window.open with '_self' as target (superbitdvd.com)

        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): Don't apply popup blocking if the call
	would open something in an existing frame (inlcuding the special
	_self, _top and _parent frames.

2003-04-18  David Hyatt  <hyatt@apple.com>

	Make sure display:table is not accidentally mutated to
	display:block.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:

2003-04-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3081926 - bookmarklet to count and display mailto links fails

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElementFunction::tryCall): Implement custom toString JavaScript method
	which calls the existing toString C++ custom method.
        * khtml/ecma/kjs_html.h: Added AnchorToString.
        * khtml/ecma/kjs_html.lut.h: Regenerated.

2003-04-18  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3172389 - Safari doesn't parse attributes within the OBJECT tag

        Reviewed by dave.

        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::updateWidget): add attributes from within the OBJECT tag to params, the list of attributes we pass to plug-ins. Don't override attributes that are already in params.

2003-04-18  David Hyatt  <hyatt@apple.com>

	Make sure display:none is ignored and not accidentally mutated
	to display:block.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:

2003-04-17  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed a bug caught by libgmalloc on Vicki's test machine

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::detach): Make sure we don't have a dangling paint device after
        detaching from the KTHMLView.
        (DocumentImpl::setPaintDevice): Allow a 0 parameter.
        * kwq/WebCoreBridge.mm:
        (nowPrinting): Handle the case of a 0 paint device.

2003-04-15  David Hyatt  <hyatt@apple.com>

	Missed a piece of the renaming on lowestPosition/rightmostPosition.
	This was already reviewed by darin.  Just missed landing one file.
	
        Reviewed by darin

        * khtml/rendering/render_box.cpp:
        (RenderBox::lowestPosition):
        (RenderBox::rightmostPosition):

2003-04-15  Trey Matteson  <trey@apple.com>

	3210061 - Forms auto-fill ignores maxlength attribute

        Reviewed by Maciej.

        * kwq/KWQTextField.mm:
        (-[KWQTextField setStringValue:]):  We now trim down incoming values
	to fit the maxlength criteria.  Matches the way we enforce this constraint
	when maxlength is set.

2003-04-15  David Hyatt  <hyatt@apple.com>

	Fix 3227983 and 3229592, both the same bug involving a movable type
	template:

	letter-spacing: .none;

	Fix is to make error-handling of exprs more generic.
	
        Reviewed by darin

        * khtml/css/parser.y:

2003-04-15  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3056913 -- please add Japanese auto-detect

        * khtml/misc/decoder.cpp: (Decoder::decode): Turn on the auto-detect code if the
        default encoding is one of the Japanese encodings. Also change things around so
        the auto-detection process doesn't clobber the old chosen encoding if it does
        not yield a result.
        
        * kwq/KWQCharsets.h: Add a new IsJapanese encoding flag.
        * kwq/KWQTextCodec.h: Add a new isJapanese() member function, used by the above.
        * kwq/mac-encodings.txt: Add the IsJapanese flag to all Japanese encodings, and
        add "jis7" as a synonym for ISO-2022-JP.
        * kwq/make-charset-table.pl: Changed to allow flags even for unused encodings.

        * kwq/KWQCharsetData.c: Regenerated.

2003-04-15  David Hyatt  <hyatt@apple.com>

	Fix for 3220809, overflow values other than visible should not
	affect the document's height (or document scrollbars).  This
	fixes squidfingers.com and briefcase.yahoo.com

	Also laying a bunch of groundwork for overflow:auto and scroll
	by adding them as supported values now.

	Fixed overflow so that overflow objects now dodge floats and
	don't let them intrude into their space.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::containingBlockWidth):
        (RenderBox::repaint):
        (RenderBox::repaintRectangle):
        (RenderBox::calcWidth):
        (RenderBox::calcAbsoluteVertical):
        (RenderBox::lowestPosition):
        (RenderBox::rightmostPosition):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::repaint):
        (RenderFlow::lowestPosition):
        (RenderFlow::rightmostPosition):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):
        (RenderLayer::convertToLayerCoords):
        (RenderLayer::scrollOffset):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setLayouted):
        (RenderObject::detach):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.h:

2003-04-15  Trey Matteson  <trey@apple.com>

	3229318 - no back entry created when searching at lonelyplanet.com

        Reviewed by Darin.

        * khtml/ecma/kjs_binding.cpp:
        (ScriptInterpreter::wasRunByUserGesture):  Treat blur/focus events as being
	user gestures, since they probably were caused by something the user did.
	This cues us to not lock history for navigations that are spawned by these events.

2003-04-15  David Hyatt  <hyatt@apple.com>

	A collection of fixes.

	(1) Don't lay out positioned elements so early in
	layoutInlineChildren.  They need to get a layout only after
	all the normal flow kids have gotten a layout (and this happens
	already in layoutPositionedObjects).

	(2) Fix a mistake with overflow:hidden.  I was applying the
	overflow-clip for positioned elements only if you had defined
	clip using the clip property.  This makes iht.com look better
	(although it still misrenders pretty badly due to some JS error
	we hit in the source).

	(3) Patch RenderText's height method to give more accurate
	information.  This affects all the layout tests. :)
	
        Reviewed by darin

        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::constructZTree):
        * khtml/rendering/render_text.cpp:
        (RenderText::height):

2003-04-14  Trey Matteson  <trey@apple.com>

	3009051 - Find on Page stops (once) at end of page, should wrap automatically	WebKit
	3051546 - Find on Page doesn't work for frameset pages
	3058437 - can have a selection in two frames at the same time (problem for finding in frames)
	3097498 - Find Previous continues to "Find Next" until end of paragraph	
	3097507 - Find Next searches from previous find hit instead of current selection

	And a commented out fix for:

	3121828 - scrollToVisible on find cuts off the left part of the view due to needless horiz. scroll

	Various missing pieces are implemented to support better finding.  The fix for
	3121828 is left out until 3228511 is dealt with.

        Reviewed by Maciej.

        * WebCore.pbproj/project.pbxproj:
        * khtml/khtml_part.cpp:
        (KHTMLPart::findTextBegin):  Added args to allow starting a find at an arbitrary
	places, such as the current selection.
        (KHTMLPart::findTextNext):  Implement reverse search - only the param was there.
	Don't do lame scrolling selection to visible here, do better ourselves later.
        * khtml/khtml_part.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::jumpToSelection):  Make whole selection rect visible, and only scroll
	anything if needed.  ***Commented out in lieu of 3228511.
        (KWQKHTMLPart::findString):  Implement find starting at the right place relative to
	the selection, forwards and backwards, and wraparound.  This is just setup around
	calling findTextNext.  Also scroll the result to be visible.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
	(-[WebCoreBridge deselectAll]):  Call part instead of doc so its state isn't out of sync.
        (-[WebCoreBridge searchFor:direction:caseSensitive:wrap:]):  Pass extra wrap arg.
        * kwq/WebCoreDOMNode.mm:
        (+[WebCoreDOMNode nodeWithImpl:DOM::]):
	Return a nil for a null element instead of croaking.
        (-[WebCoreDOMNode initWithImpl:DOM::]):  Ditto.

2003-04-14  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3214900 - iBench JavaScript test times get progressively slower with each test run

	The fix is to make sure to always cast NodeImpl * to DocumentImpl
	*. Multiple inheritance means the pointer values need not be the
	same.
	
        * khtml/ecma/kjs_binding.cpp:
        (ScriptInterpreter::getDOMObjectForDocument):
        (ScriptInterpreter::putDOMObjectForDocument):
        (ScriptInterpreter::deleteDOMObjectsForDocument):
        (ScriptInterpreter::forgetDOMObjectsForDocument):
        * khtml/ecma/kjs_binding.h:
        * khtml/ecma/kjs_dom.cpp:
        (KJS::getDOMNode):

2003-04-11  David Hyatt  <hyatt@apple.com>

        Reviewed by darin

        * ChangeLog:
        * khtml/css/cssstyleselector.cpp:
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::parseComment):

2003-04-11  David Hyatt  <hyatt@apple.com>

	Refine the code that sets the display of floating and positioned
	elements to block.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:

2003-04-14  Chris Blumenberg  <cblu@apple.com>

	Fixed build failure.

        Reviewed by darin.

        * khtml/rendering/render_table.cpp:
        (RenderTable::cellAbove):

2003-04-12  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3162338 - Embedding SVG with <object type="image/svg+xml"> doesn't work

	Whenever we encounter an OBJECT tag with a type that starts with "image/" we create a render image object instead of a render part object. The behavior is nice because this allows the render object to resize to the size of the image if no WIDTH and HEIGHT are supplied. For example, the image at the bottom of this page:

	http://tantek.com/CSS/Examples/boxmodelhack.html

	The problem is that we do this for image types that we can't handle and when there are plug-ins that *can* handle the types.

        Reviewed by dave.

        * khtml/html/html_objectimpl.cpp:
        (HTMLObjectElementImpl::rendererIsNeeded): call canRenderImageType instead of serviceType.startsWith
        (HTMLObjectElementImpl::createRenderer): call canRenderImageType instead of serviceType.startsWith
        (HTMLObjectElementImpl::attach): call canRenderImageType instead of serviceType.startsWith
        * kwq/KWQPixmap.h:
        * kwq/KWQPixmap.mm:
        (canRenderImageType): new, checks if the MIME type is supported by the image factory
        * kwq/WebCoreImageRendererFactory.h: added supportedMIMETypes to the WebCoreImageRendererFactory protocol

2003-04-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3165326 - javascript getSelection not implemented
	
        * khtml/ecma/kjs_window.cpp:
        (Window::get):
        (WindowFunc::tryCall):
        * khtml/ecma/kjs_window.h:
        * khtml/ecma/kjs_window.lut.h:

2003-04-13  Trey Matteson  <trey@apple.com>

	3219720 - autofill mapping confused by tables, worse than MacIE (at store.apple.com)

	If in scanning backwards we get to the end of a table row, we take a diversion
	and scan the cell that is above the cell we started at.
	Big improvement for store.apple.com.

        Reviewed by Maciej

        * khtml/rendering/render_table.cpp:
        (RenderTable::cellAbove):  New support routine to find the cell above another
        * khtml/rendering/render_table.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::searchForLabelsAboveCell):
	Get the cell above, scan its tree for matching text.
        (KWQKHTMLPart::searchForLabelsBeforeElement):
	Call above routine if we are working within a table

2003-04-12  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3188070 - 6I32 EMBED tag with no SRC attribute doesn't load the plugin

        Reviewed by dave.

        * khtml/khtml_part.cpp:
        (KHTMLPart::requestObject): allow URL-less parts

2003-04-11  Trey Matteson  <trey@apple.com>

	3148002 - printing shouldn't depend on the size of the window

	The basic strategy is copied from khtmlview's print method:  We reset the width
	of the document to the paper width minus margins, and relayout before paginating
	and printing.

        Reviewed by Richard.

        * khtml/rendering/render_root.cpp:
        (RenderRoot::layout):  Always resize our view, even when doing a layout when in
	printing mode.  It's necessary to change the view size because we rely on the AppKit
	built-in pagination, which operates using the view geometry.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::forceLayoutForPageWidth):  New method to do a layout given a
	specific width.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge _setPrintingMode:]):  Helper routine to take the RenderRoot in
	and out of printing mode.
        (-[WebCoreBridge forceLayout]):  Turn printing mode on/off.
        (-[WebCoreBridge forceLayoutForPageWidth:]):  Turn printing mode on/off.
	New glue routine to call part.
        (-[WebCoreBridge drawRect:withPainter:]):  Turn printing mode on/off.
        (-[WebCoreBridge drawRect:]):  Test paintDevice type instead of graphics context
	to determine printing mode.  The latter is still on when we are wrapping up the
	job and want to be setting things back to normal.
        (-[WebCoreBridge adjustFrames:]):  Ditto.
        (-[WebCoreBridge adjustPageHeightNew:top:bottom:limit:]):  Turn printing mode on/off.

2003-04-11  Darin Adler  <darin@apple.com>

        Reviewed by Richard.

	- fixed 3225472 -- www.sina.com.cn uses A3A0 for full-width space; used to work in Simplified Chinese (Mac OS)

        * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertUsingTEC): Work around the problem
        in the Text Encoding Converter by changing all U+E5E5 to U+3000.

        * kwq/KWQString.h: Added replace(QChar, QChar), since Qt has it and I need it.
        * kwq/KWQString.mm:
        (QString::find): Fixed a bug where we'd yield a FATAL and return -1 on deployment
        if you searched for a non-ASCII character in a string that had ASCII valid and
        not Unicode valid.
        (QString::replace): Added replace(QChar, QChar).

=== Safari-73 ===

2003-04-10  Trey Matteson  <trey@apple.com>

	3224973 - Safari sometimes stores data for AUTOCOMPLETE=OFF fields and password fields

	New WC support function.

        Reviewed by Darin.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementWithName:inForm:]):  Run through the form's elements
	looking for a matching name.

=== Safari-72 ===

2003-04-10  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin and Ken.

	- fixed 3223127 - REGRESSION: windows for PopCap games show scroll bars now, did not in Safari-60

        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): Re-add scrollbars property, but change it
	to default to on even when other properties are specified (unlike
	other window properties). This seems to match what Mac IE, Win IE
	and Windows Mozilla do.

2003-04-10  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

        - speed up startup by not loading the hand cursor until it's used

        * khtml/khtml_part.cpp: (KHTMLPart::urlCursor): Use the hand cursor.
        * khtml/khtmlpart_p.h: Don't store the hand cursor in a per-part global.

2003-04-10  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3224077 -- REGRESSION: tables on MacNN forums messed up because we reject %% due to style parser

        * khtml/css/tokenizer.flex: Add a + sign after the % in the percentage rule so we allow
        any number of extra percent signs. This is a temporary hack.

        * khtml/css/Makefile.am: Add make rules to build tokenizer.cpp so we don't have to do it by hand.
        * khtml/css/maketokenizer: Added. Script used by the make rules.
        * khtml/css/tokenizer.cpp: Regenerated. The only substantive change is in the state tables.

2003-04-09  David Hyatt  <hyatt@apple.com>

        This first fix is a refinement of the patch I produced to fix <nobr>
	on cnn.com recently.  It wasn't quite good enough to plug the
	regression on other sites.  This fix just checks the object
	we're currently breaking on (which is what I meant to do) and
	not the last object examined (which will always just be the
	previous object you looked at).

	The code currently in the tree would work if you had two objects
	like this:

	[Normal Whitespace] [Nowrap Whitespace]

	but not if you had three:

	[Normal][Nowrap][Nowrap]

	Since when you looked at the third object, |last| would be the
	previous nowrap object and not the normal object.  The line break
	properly stays at the normal object as long as nowrap objects are
	encountered, so this patch basically does what the original was
	intended to do.

	This fixes the line break problems on 1800flowers.com, a line break
	problem on the bugzilla.mozilla.org layout test, a problem
	on the zdnet layout test, and 3207196 a regression on livejournal.

	The second fix in this patch is a simple reversal of 
	containsOnlyWhitespace.  The method on RenderText was 
	backwards!  No logical changes have been made... I just inverted
	all the callers, and then I patched the method.
        
        The third fix is to make images check for == normal instead of != nowrap
        in a few places, thus preventing incorrect line break points from being
        set up.
        
        Reviewed by gramps

        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_text.cpp:
        (RenderText::calcMinMaxWidth):
        (RenderText::containsOnlyWhitespace):

2003-04-09  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3223414 -- update text encoding menu and encoding names table

        Made changes as suggested by Deborah Goldsmith and Peter Edberg from the International group.

        * kwq/mac-encodings.txt:
        Moved all Korean character sets that are not explicitly Macintosh from MacKorean to EUC_KR.
        Moved Shift JIS character sets that are not explicitly Microsoft from DOSJapanese to ShiftJIS_X0213_00.
        Moved cp949 from DOSKorean to EUC_KR (DOSKorean is not implemented in Jaguar).
        Moved big5 character sets that are not explicitly Microsoft from DOSChineseTrad to Big5_HKSCS_1999.
        Moved all gb2312-80 character sets from GB_2312_80 to GB_18030_2000.
        Moved all gbk character sets from GBK_95 to GB_18030_2000.
        Moved all euc-cn character sets from EUC_CN to GB_18030_2000.

        * kwq/KWQCharsetData.c: Regenerated.

2003-04-09  Darin Adler  <darin@apple.com>

        Reviewed by Richard.

	- fixed 3223126 -- REGRESSION: exception BrowserWindow isDescendantOf:]: selector not recognized

        * kwq/KWQWidget.mm: (QWidget::hasFocus): Add missing check of the class of the first
        responder before calling an NSView method on it.

2003-04-09  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3222708 -- REGRESSION: repro crash trying to read news at nttdocomo

        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Make window.open do its location
        change with scheduleRedirection like all the other JavaScript calls that change location.

2003-04-08  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3221400 -- REGRESSION: password field with onfocus handler that does select causes focus/typing trouble

        * kwq/KWQTextField.mm:
        (-[KWQTextField selectText:]): Rearrange slightly.
        (-[KWQTextField becomeFirstResponder]): Add code to make the secure field first responder
        when in password mode. The old code did this indirectly through the call to setDocumentFocus,
        which caused minor trouble.
        (-[KWQSecureTextField selectText:]): Correct the current editor check to use a technique
        that works even for the secure text field's editor (which does not get returned by currentEditor).
        
        * kwq/KWQWidget.mm: (QWidget::hasFocus): Update the logic here so it works for the secure text
        field and the secure text field's editor.

2003-04-08  David Hyatt  <hyatt@apple.com>

	Fix for 3166374.  Making the nudie blog work.  My loop for
	removing floating objects when they got deleted wasn't catching
	all the cases.
	
        Reviewed by darin

        * khtml/rendering/render_object.cpp:
        (RenderObject::removeFromObjectLists):

2003-04-08  David Hyatt  <hyatt@apple.com>

	Fix for 3220979.  Regression caused by changes to the CSS
	parser's error handling.  Fix is to narrow my original patch
	to handle a specific subtype of error for properties.
	
        Reviewed by darin

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:

2003-04-08  Richard Williamson   <rjw@apple.com>

        Fixed 3221353.  Added check for nil part.
        
        Reviewed by Darin.

        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::detach):

2003-04-07  Richard Williamson  <rjw@apple.com>

        Fix for 3220988.  Cancel frame load if it's detached before
        finished loading.
        
        Reviewed by Maciej.

        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::detach):
        * khtml/khtml_part.h:
        * kwq/KWQKHTMLPart.mm:
        (KHTMLPart::frameDetached):
        * kwq/WebCoreBridge.h:

2003-04-07  David Hyatt  <hyatt@apple.com>

	Fix for 3220395.  nearestFloatBottom() mistakenly returned 0
	when it ran out of floats to return.
	
        Reviewed by gramps

        * khtml/rendering/render_block.cpp:

2003-04-07  David Hyatt  <hyatt@apple.com>

	Fix for the scrollbar problem in 3220395.  Does not yet fix
	the overlap problem.  lowest/rightmostPosition got broken by
	the RenderFlow split.  This patch makes sure that we still crawl
	into inlines with overhangingContents.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::lowestPosition):
        (RenderFlow::rightmostPosition):
        * khtml/rendering/render_flow.h:

2003-04-07  David Hyatt  <hyatt@apple.com>

	* khtml/html/htmlparser.cpp:
	(KHTMLParser::handleResidualStyleCloseTagAcrossBlocks):

	This is a patch to the parser to prevent residual 
	style from creating illegal constructs according to the DTD.
	For now, it will just bail on performing the fixup if an
	illegal construct would be created.

	This fixes the regression #3219944.

	Reviewed by darin
	
2003-04-07  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3220490 -- REGRESSION: MALLORY horiz scrollbar incorrectly appears with abs positioned content

        * khtml/rendering/render_block.cpp: (RenderBlock::rightmostPosition):
        Fix a place where I had xPos instead of yPos.

=== Safari-71 ===

2003-04-04  Darin Adler  <darin@apple.com>

        Reviewed by John and Richard.

	- fixed 3218725 -- REGRESSION: reproducible crash in recalcStyle on reload

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): Initialize m_paintDevice to 0.

2003-04-04  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3125850 -- VIP: "search by goo" instead of "search by google" at livepage.apple.com
        
        We decided not to fix the general problem right now, but just hack the site.

        * khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::parseAttribute):
        Just ignore the style set by livepage.apple.com, so we get a too-big
        "Search by Google" rather than a cut off "Search by Goo".

2003-04-04  David Hyatt  <hyatt@apple.com>

	Fix for the Search button cutoff on livepage.apple.com  We
	weren't honoring hspace/vspace on input elements.
	
        Reviewed by darin

        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::parseAttribute):

2003-04-04  David Hyatt  <hyatt@apple.com>

	Fix for 3218085.  Remove the bogus 2cm print rule for body in the
	html4.css sheet.
	
        Reviewed by darin/trey

        * khtml/css/html4.css:

2003-04-04  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3217687 -- REGRESSION: printing uses widths from screen fonts, messing up layout

        To get the style machinery working for me instead of against me, I had to introduce both
        FontDef and QFont to the screen/printer font dichotomy. Just following that through took
        care of the bugs we were seeing.

        * khtml/rendering/font.h: Add a usePrinterFont field to FontDef (in APPLE_CHANGES).
        * khtml/rendering/font.cpp: (Font::update): Set the new "printer font" field on the QFont
        (in APPLE_CHANGES).
        
        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): Set usePrinterFont field on the
        document's fontDef (in APPLE_CHANGES).
        
        * kwq/KWQFont.h: Add isPrinterFont, setter, getter.
        * kwq/KWQFont.mm:
        (QFont::QFont): Default isPrinterFont to false, copy when copying.
        (QFont::operator=): Copy isPrinterFont.
        (QFont::setPrinterFont): Added.
        (QFont::operator==): Compare isPrinterFont.
        
        * kwq/KWQFontMetrics.mm: Remove the _rendererUsesPrinterFont field and associated code.
        This was only needed when the same QFont could be both printer and screen font, but now
        the QFont itself is different.
        * kwq/KWQPainter.mm: (QPainter::_updateRenderer): Remove textRendererUsesPrinterFont field
        and associated code, for same reason as above.
        
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge reapplyStylesForDeviceType:]): Set the document's
        paint device.
        
        * kwq/WebCoreTextRendererFactory.h: Remove global setUsingPrinterFonts: and
        usingPrinterFonts methods. We now handle this at the document level. Add a usingPrinterFont:
        parameter to rendererWithFont:, which is now how KHTML tells the text rendering code which
        kind to use.
        * kwq/WebCoreTextRendererFactory.m: Removed KWQTextRendererFactoryUsingPrinterFonts.
        (-[WebCoreTextRendererFactory rendererWithFont:usingPrinterFont:]): Added parameter.

        - other changes
        
        * kwq/KWQPaintDevice.h: Store the device type instead of using a virtual function.
        * kwq/KWQPrinter.h: Set device type in constructor instead of overriding devType function.
        * kwq/KWQPixmap.h: Changed destructor back to non-virtual (and entire class back to
        non-polymorphic), now that QPaintDevice doesn't use virtual functions any more.

        * kwq/KWQPaintDeviceMetrics.h: Remove unused width() and height().
        * kwq/KWQPaintDeviceMetrics.mm: Ditto.
        
        * WebCore.pbproj/project.pbxproj: Removed KWQTextRendererFactory.h.
        * kwq/KWQTextRendererFactory.h: Removed.

2003-04-03  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3031544 - can't login on secure paytrust page due to lack of onchange handler

        * kwq/KWQTextField.mm:
        (-[KWQTextField control:textShouldBeginEditing:]): Send FocusIn event
	to event filter here.
        (-[KWQTextField control:textShouldEndEditing:]): Send FocusOut event to
	event filter here.
        (-[KWQTextField fieldEditorDidBecomeFirstResponder]): Removed.
        (-[KWQTextField fieldEditorDidResignFirstResponder]): Removed.
        * kwq/WebCoreFirstResponderChanges.h: Removed first responder methods.

2003-04-03  Trey Matteson  <trey@apple.com>

	3067928 - printing should not break lines in half
	3217607 - when printing we should not draw the selection

	We leverage the existing knowledge that a couple render object classes had
	for adjusting pagination.  Wrote 3217705 saying we should add similar
	smarts to a few more places.

        Reviewed by Darin.

        * ForwardingHeaders/qprinter.h: Added.
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::paintObject):  Call our special setBestTruncatedAt instead
	of khtml's setTruncatedAt.
        * khtml/rendering/render_root.cpp:
        (RenderRoot::setBestTruncatedAt):  Accumulate the best pagination boundary.
        * khtml/rendering/render_root.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::paintObject):  Call our special setBestTruncatedAt instead
	of khtml's setTruncatedAt.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::paint):  Don't draw the debugging red background when printing.
        (KWQKHTMLPart::adjustPageHeight):  The meat of the change.  Make another
	painting pass (with actual painting disabled) to get the pagination boundary
	set as a side effect.  Return result up to AppKit.
        * kwq/KWQPaintDevice.h:  devType() made virtual
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::QPainter):  New constructor for making a printing painter.
        (QPainter::device):  Return either the Screen or Printer device.
        * kwq/KWQPixmap.h:  Destructor needed to become virtual.
        * kwq/KWQPrinter.h:  Implement devType().
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge drawRect:]):  Setup printer device in our painter if we're
	not drawing to the screen.
        (-[WebCoreBridge adjustFrames:]):  Ditto.
        (-[WebCoreBridge adjustPageHeightNew:top:bottom:limit:]):  Forward to part.

2003-04-03  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3194468 -- ARCH: text zoom should scale line-height as well as font-size

        * khtml/css/css_valueimpl.h:
        * khtml/css/css_valueimpl.cpp: (CSSPrimitiveValueImpl::computeLength): Add a new version that does
        a multiply before rounding. Also simplify the rounding code.
        
        * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): For line height, multiply by the
        text zoom factor in cases where the height isn't already relative to the font size.

        - other changes

        * khtml/rendering/render_replaced.cpp: (RenderWidget::paintObject): Disable code to work around
        X11 widget size limit. It can only do harm for us.

2003-04-03  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed bug 3216832 -- REGRESSION: scroll bar doesn't appear soon enough when shrinking excite.com horizontally

        * khtml/rendering/table_layout.cpp: (AutoTableLayout::calcEffectiveWidth):
        Fixed mistake where using the wrong variable led to the colspan distribution
        loop terminating early, and not giving any additional width to the second column.

        - fixed some navigator properties as discussed in the meeting yesterday (with Don, Dave, Mike Malone)

        * khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty):
        Use the date 20030107 instead of 20021225 because people think it's less arbitrary.
        Use "Apple Computer, Inc." as the vendor string.

2003-04-02  David Hyatt  <hyatt@apple.com>

	Fix for 3216650.  Needed an additional check when the disabled
	attribute is changed on <link> elements for stylesheets to keep
	the pending sheet count in sync.
	
        Reviewed by gramps

        * khtml/html/html_headimpl.cpp:
        (HTMLLinkElementImpl::parseAttribute):

2003-04-02  David Hyatt  <hyatt@apple.com>

	Fix for 3212011.  Avoid applying a fixup to the minwidth
	of overflow:hidden table cells, since we don't really have
	an accurate width to compare against.

	I filed followup bug 3216709 to deal with the fact that this
	fixup has been disabled.
	
        Reviewed by john

        * khtml/rendering/render_block.cpp:

2003-04-02  David Hyatt  <hyatt@apple.com>

	Do not assume all columns have a minwidth/maxwidth of 1px.
	Instead give them a min/maxwidth of 0px, and only inflate to
	1px if a cell originates in the column.

	This fixes the error on travelocity.com, where a large colspan
	leads to the implicit creation of a new column that contains no
	originating cells.  That new column should be 0px wide, not 
	1px.

	The bug # is 3170592.
	
        Reviewed by kocienda

        * khtml/rendering/table_layout.cpp:
        (AutoTableLayout::recalcColumn):
        * khtml/rendering/table_layout.h:

2003-04-01  David Hyatt  <hyatt@apple.com>

	Fix for excite.com.  There are many bugs being fixed that all
	contributed to the wideness of the table.

	The bug # is 3200534
	
        Reviewed by darin

        * khtml/rendering/table_layout.cpp:
        (shouldScaleColumns):

2003-04-02  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3213854 -- REGRESSION: can't click on a text field to select it
	- fixed 3201477 -- friends links don't work on hyatt's blog

        * khtml/rendering/render_object.cpp: (RenderObject::nodeAtPoint): Skip floating objects when
        hit testing children.
        * khtml/rendering/render_inline.cpp: (RenderInline::nodeAtPoint): Ditto.

2003-04-01  Trey Matteson  <trey@apple.com>

	3119711 - redirects to anchors leave window half-loaded (was SCClib.org is half loaded, half rendered)

	The problem happened when an anchor nav was the last half of a client redirect.
	We would never stop the redirect timer, and thus never post a clientRedirectCanceled
	message up through the stack.  This left the app thinking that it was in redirect
	mode even when the whole navigation had finished, which makes it not clear the
	progress bar.

        Reviewed by Darin.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::scrollToAnchor):  Stop the redirect timer.

2003-04-01  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 3182103 - REGRESSION: one developer.apple.com page is so slow, it almost seems like a hang 
	
        * khtml/rendering/bidi.cpp:
	(RenderBlock::findNextLineBreak): Avoid returning bad iterators
	that point past the end of an object instead of to the start ot
	the next one.

2003-04-01  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3123709 -- redirect isn't followed at Apple's Dental Benefits provider

        * khtml/dom/dom2_events.h: Added boolean "isWindowEvent" parameter.
        * khtml/dom/dom2_events.cpp: (EventListener::handleEvent): Ignore boolean "isWindowEvent" parameter.

        * khtml/ecma/kjs_events.h: Added boolean "isWindowEvent" parameter.
        * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Look at new "isWindowEvent" parameter,
        and send the event to the window if it's true, rather than the current node, document, and form.

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::defaultEventHandler): Pass true for "isWindowEvent".
        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::handleLocalEvents): Pass false for "isWindowEvent".

2003-04-01  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3144287 -- CSS with media=print not used when printing

        * kwq/KWQKHTMLPart.h: Added a setMediaType function, so the bridge can access
        the KHTMLView::setMediaType function, which is private (KWQKHTMLPart is a friend).
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::setMediaType): Call setMediaType on the
        KHTMLView.
        
        * kwq/WebCoreBridge.h: Added a device type parameter to reapplyStyles.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge reapplyStylesForDeviceType:]):
        Call setMediaType with the appropriate media type for the passed in device type.

2003-04-01  David Hyatt  <hyatt@apple.com>

	Table code fixes.  Working to try to fix excite.com.
	
        Reviewed by darin

        * khtml/rendering/table_layout.cpp:
        (shouldScaleColumns):
        (AutoTableLayout::calcMinMaxWidth):

2003-04-01  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3213900 -- REGRESSION: crash in CSS parser at http://radioalice.com/

        * khtml/css/cssparser.cpp: (CSSParser::parseColor): Add a missing check for nil.

2003-04-01  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed 3202542 -- REGRESSION: preinitialized password inputs do not show dots (affects mac.com)

        * kwq/KWQTextField.mm: (-[KWQTextField setPasswordMode:]): Remove code that sets the string
        value to "". This is not needed, and because a text changed signal is sent out it makes the
        caller think the text was deleted intentionally. Added code to move the string from the current
        field in use to the other field, so changing the password mode does not make the string go away.
        The old code was fragile and depended on the order of operations.

2003-03-31  Darin Adler  <darin@apple.com>

        * English.lproj/InfoPlist.strings: Changed "1.0 Beta" to "1.0 Beta 2".
        * WebCore.pbproj/project.pbxproj: Changed "1.0 Beta" to "1.0 Beta 2".

2003-03-31  David Hyatt  <hyatt@apple.com>

	Fixes for 3211862 and 3212750, add error-handling cases for
	property values to the CSS parser so the whole sheet doesn't
	get rejected.
	
        Reviewed by darin

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:

2003-03-31  Darin Adler  <darin@apple.com>

        Reviewed by Chris.

	- fixed 3213093 -- REGRESSION: crash accessing menu items right after launch with about:blank as homepage

        * khtml/khtmlview.cpp: (KHTMLView::viewportMouseMoveEvent):
        Another place needed a check for null.

2003-03-31  David Hyatt  <hyatt@apple.com>

	Fix for 3211849.  I accidentally removed a BORDER_COLOR case
	from the switch when I removed the transparency check for
	the shorthand.  The case originally fell through to the case
	below it, so a straight removal was wrong.  I needed to add
	it to the following set of case labels.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:

2003-03-31  David Hyatt  <hyatt@apple.com>

	First-letter can be floated.  Make sure we mutate the display
	to BLOCK so that we don't make an inline when we're floating.
	Fixes bug 3186004.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:

2003-03-31  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3213093 -- accessing menu items immediately after launch causes crash when about:blank is homepage

        * khtml/khtmlview.cpp: (isSubmitImage): Add check for node of 0.
        
        - fixed 3211461 -- crash in KWQListIteratorImpl tabbing through w3c test page

        * kwq/KWQKHTMLPart.h: Added childFrameForPart function, better than KHTMLPart::frame because it works
        for HTML frames inside objects as well as plain old HTML frames.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::childFrameForPart): Like KHTMLPart::frame, but looks through m_objects too.
        (KWQKHTMLPart::nextKeyViewInFrameHierarchy): Use childFrameForPart instead of frame function.

2003-03-30  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3206524 - incyte.com "load properties" function does not work
	
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::close): Make sure to clear the tokenizer before firing
	the onLoad handler, otherwise document.write from inside an onLoad handler
	will fail.
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::close): Call closeInternal.
        (DocumentImpl::closeInternal): New version of close that allows
	bypassing the tokenizer null check, in case we already deleted the
	tokenizer/

2003-03-30  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3169064 - can't search at lonelyplanet.com; onSubmit handler fails due to problem addressing radio button
	
        * khtml/ecma/kjs_dom.cpp:
        (DOMNamedNodesCollection::tryGet): Allow lookup by id as well as
	by integer index.

2003-03-29  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3138427 - new window opened by javascript is too small for popcap.com game

        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): Be a bit more tolerant of misformatted attribute strings.

2003-03-29  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3180786 - Can't log in to the LL Bean Web site

	The problem on this site was misnested tags, leading to two FORM
	elements that were nested. Both their onSubmit handlers fired, and
	the outer one returned false. The fix was to avoid bubbling submit
	events, since this can never be useful in a valid document and
	because that is what other browsers seem to do, and what Win IE
	documents.
	
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::prepareSubmit): Don't allow the submit event to bubble.

2003-03-28  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- improved on Darin's fix for 3211289 - REGRESSION: nil-deref in bridgeForWidget 
	
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::bridgeForWidget): Special-case KHTMLView - this is
	the only kind of widget in the program that's not a form control
	(so nodeForWidget would return nil for it).

2003-03-28  David Hyatt  <hyatt@apple.com>

	Fix a regression caused by my addition of nearestFloatBottom
	to the code.  I needed to make that a loop rather than just call
	it once, since the nearestFloatBottom could be a bad position
	for the next line.

	This fixes the overlapping text problem at CNN: 3186593.
	
        Reviewed by john

        * khtml/rendering/bidi.cpp:

2003-03-28  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3191163 -- hang in QPtrListIterator at www.phiffer.com
        - fixed 3183520 -- XML page has no vertical scrollbar

        The hang was due to an exponential algorithm in lowest/rightmostPosition.
        Fixed by making some simplifications to these functions, used only to determine the size
        of the entire web page. While doing that I cleared some things up that made the XML
        scroll bar problem go away too.
        
        Note that www.phiffer.com still does not render right.

        * khtml/rendering/render_block.cpp:
        (RenderBlock::lowestPosition): Since this is always called on the whole tree, don't worry
        about which parent deals with which child. Just make sure that every object is visited
        exactly once.
        (RenderBlock::rightmostPosition): Ditto.
        * khtml/rendering/render_html.cpp: (RenderHtml::layout): Use the result from calling
        lowestPosition on the root, since some floating/positioned objects hang off there, rather
        than here. This seems consistent with the long term approach of doing more work in the root
        and less in RenderHtml, since XML documents don't have a RenderHtml.
        * khtml/rendering/render_root.cpp:
        (RenderRoot::docHeight): Call lowestPosition() on self rather than on children. Now that
        I understand the method, it's clear this is the correct way to do things.
        (RenderRoot::docWidth): Ditto, but rightmostPosition().

	- fixed 3211289 -- REGRESSION: nil-deref in bridgeForWidget

        Maciej may have some ideas about how to fix this even better, but this
        is better than just rolling his change out.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::nextKeyViewForWidget): Added an assertion.
        (KWQKHTMLPart::bridgeForWidget): Handle case where node is 0 by returning 0.
        (KWQKHTMLPart::partForNode): Added an assertion.
        (KWQKHTMLPart::nodeForWidget): Handle case where eventFilterObject is 0 by returning 0.
        (KWQKHTMLPart::setDocumentFocus): Quietly do nothing if the node is 0.
        (KWQKHTMLPart::clearDocumentFocus): Quietly do nothing if the node is 0.

2003-03-27  David Hyatt  <hyatt@apple.com>

	A collection of fixes for tables.

	(1) Fixed table layout should only be used if an explicit width
	is specified on a table.
	(2) width="0" and height="0" should be ignored on table cells!
	(3) Fixed table layout wasn't spreading extra space over 
	columns.
	
        Reviewed by mjs

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableCellElementImpl::parseAttribute):
        * khtml/rendering/render_table.cpp:
        (RenderTable::setStyle):
        * khtml/rendering/table_layout.cpp:
        (FixedTableLayout::layout):

2003-03-27  David Hyatt  <hyatt@apple.com>

	Fix for the top of directory.apple.com.  Only use the fixed
	width on the cell (with nowrap set) if it is *larger* than
	our current minwidth.
	
        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTableCell::calcMinMaxWidth):

2003-03-27  David Hyatt  <hyatt@apple.com>

	Fix for 3166374.  When a float is removed, crawl up and down the
	tree looking for blocks that contain the float and dirty them all.
	
        Reviewed by darin

        * ChangeLog:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::markAllDescendantsWithFloatsForLayout):
        (RenderObject::removeFromObjectLists):
        * khtml/rendering/render_object.h:

2003-03-27  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3192344 - nil-deref in KWin::info scrolling amazon while other shopping tabs load
	- fixed 3098365 - Default window size changes as a result of popup windows
	- fixed 3189291 - javascript window.close() closes window, not just originating tab

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::scheduleClose): Close via the bridge, not the window directly.
        (KWQKHTMLPart::bridgeForWidget): Take const QWidget * instead of QWidget *.
        (KWQKHTMLPart::nodeForWidget): Likewise.
        (KWQKHTMLPart::khtmlMousePressEvent): Deal with responder issues via bridge,
	not window directly.
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Likewise.
        (KWQKHTMLPart::mouseDown): Likewise.
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow): Set resizability via bridge,
	not window directly.
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea becomeFirstResponder]): Deal with bridge for first responder
	issues, not window directly.
        (-[KWQTextArea drawRect:]): Likewise.
        (-[KWQTextAreaTextView insertTab:]): Likewise.
        (-[KWQTextAreaTextView insertBacktab:]): Likewise.
        (-[KWQTextAreaTextView shouldDrawInsertionPoint]): Likewise.
        (-[KWQTextAreaTextView selectedTextAttributes]): Likewise.
        * kwq/KWQWidget.mm:
        (QWidget::setActiveWindow): Focus window via bridge.
        (QWidget::hasFocus): Handle first responder issues via bridge.
        (QWidget::setFocus): Likewise.
        (QWidget::isVisible): Get window from bridge.
        (QWidget::mapFromGlobal): Get window from bridge.
        (QWidget::disableFlushDrawing): Add comment noting why it's OK
	to get the window from the view instead of from the bridge here.
        (QWidget::enableFlushDrawing): Likewise.
        * kwq/KWQWindowWidget.mm:
        (KWQWindowWidget::frameGeometry): Work through bridge, not window
	directly.
        (KWQWindowWidget::mapToGlobal): Likewise.
        (KWQWindowWidget::setFrameGeometry): Likewise.
        * kwq/WebCoreBridge.h:

2003-03-27  David Hyatt  <hyatt@apple.com>

	This is just a long-standing screwup where I didn't port an old
	table fix I made to Lars' new table code properly.  The original
	fix had this check in it.

	The bug is 3171963 (cvs.com).
	
        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTableSection::layoutRows):

2003-03-27  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed 3156509 -- Safari fills src="" frame with current contents of frameset instead of leaving it empty

        The trick here is to always use "about:blank" when the frame URL is empty string.
        If we pass the empty string elsewhere, it's going to get passed to completeURL and
        turned into a reference to the current document, and we have to avoid doing that
        ourselves explicitly too.

        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::HTMLFrameElementImpl): Let the URL default to null rather
        than "about:blank". We do want to treat the frame as "about:blank", but that's not
        something people should see when inspecting the frame via the DOM.
        (HTMLFrameElementImpl::isURLAllowed): Allow empty URLs explicitly, so we don't
        call completeURL on them.
        (HTMLFrameElementImpl::updateForNewURL): Map empty URLs to "about:blank" at this level.
        (HTMLFrameElementImpl::attach): Do the same thing here. At some point we can share more
        code between these two.
        (HTMLFrameElementImpl::setLocation): Change this to call updateForNewURL. Not only does
        this make us handle the empty URL case properly, it also gets the benefit of other things
        we do in updateForNewURL, like handling the "isURLAllowed" rule, and properly handling
        the case where we already have a suitable frame.

        - other changes

        * kwq/KWQKHTMLView.mm: Improved a comment.

=== Safari-69 ===

2003-03-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Chris.

	- fix unitialized access.
	
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):

2003-03-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	Made progress towards better handling of window operations.
	
        * khtml/ecma/kjs_window.cpp:
        (Window::get): Replace a few part->widget() calls with part->view() -- just
	as good for the real khtml, but easier to adapt to with KWQ.
        (WindowFunc::tryCall): Likewise.
        * khtml/khtmlview.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::~KWQKHTMLPart): Delete the window widget.
        (KWQKHTMLPart::topLevelWidget): Return the window widget.
        (KWQKHTMLPart::setBridge): Make a new window widget passing it the bridge.
        * kwq/KWQKHTMLView.mm:
        (KHTMLView::topLevelWidget): Moved here from KHTMLView; get the top level
	widget from the part.
        (KHTMLView::mapToGlobal): Moved here from KHTMLView; add a needed cast.
        * kwq/KWQWidget.h:
        * kwq/KWQWidget.mm: Remove all top level widget considerations.
        * kwq/KWQWindowWidget.h:
        * kwq/KWQWindowWidget.mm:
        (KWQWindowWidget::KWQWindowWidget): Changed to work based on bridge, not window.
        (KWQWindowWidget::~KWQWindowWidget): Ditto.
        (KWQWindowWidget::frameGeometry): Ditto.
        (KWQWindowWidget::mapToGlobal): Ditto.
        (KWQWindowWidget::mapFromGlobal): Ditto.
        (KWQWindowWidget::setFrameGeometry): Ditto.

        Also:

	* kwq/KWQKHTMLPart.cpp: Removed stuff that did not belong here.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::selectionStartOffset): Moved here from KWQKHTMLPart.cpp
        (KWQKHTMLPart::selectionEndOffset): Likewise.
        (KWQKHTMLPart::selectionStart): Likewise.
        (KWQKHTMLPart::selectionEnd): Likewise.
        (KWQKHTMLPart::selectionRect): Likesie.

2003-03-26  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

        - fixed a storage leak when running cvs-base

        * khtml/rendering/render_list.h: Added _markerInstalledInParent.
        * khtml/rendering/render_list.cpp:
        (RenderListItem::setStyle): Set _markerInstalledInParent to false when
        creating a new marker.
        (RenderListItem::detach): Detach the marker if it's not not installed in the
        parent yet.
        (RenderListItem::updateMarkerLocation): Set _markerInstalledInParent to true
        when installing the marker in a parent.

2003-03-26  David Hyatt  <hyatt@apple.com>

	Make <label> use tag list 1.  Fixes 3206063.  Residual style
	changes called this out.
	
        Reviewed by darin

        * khtml/html/dtd.cpp:
        (DOM::checkChild):

2003-03-26  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3208468 -- REGRESSION: checkbox immediately unchecks the first time you check it

        The stateChanged signal must be delivered before the mouse up event is handled.

        * kwq/KWQButton.mm:
        (-[KWQButton initWithQButton:]): Use [self init] instead of [super init]; no real difference,
        just makes more logical sense.
        (-[KWQButton action:]): Don't send the mouse up event here.
        (-[KWQButton sendConsumedMouseUpIfNeeded]): Added. New method that sends the consumed mouse
        up event.
        (-[KWQButton mouseDown:]): Use a simplified scheme that uses only a single boolean to control
        sending the consumed mouse up event. Call sendConsumedMouseUpIfNeeded to do the deed.
        (QButton::clicked): Added comment to explain why it's important to send the consumed mouse
        up event here. Added a call to the new sendConsumedMouseUpIfNeeded method, replacing the
        code that was formerly in -[KWQButton action:].

2003-03-25  David Hyatt  <hyatt@apple.com>

	Fix font-family parsing to match the spec (and other browsers).

	This fixes bugs 3197584 and 3207760.

	Also fix pseudos to be lower-cased.  Fixes 3208303.
	
        Reviewed by darin

        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        (CSSParser::parseFontFamily):

2003-03-24  Trey Matteson  <trey@apple.com>

	Pass -seg_addr_table_filename <FILENAME> to ld.  This makes our frameworks in
	SYMROOT actually work for symbol resolution because they will have the correct
	prebinding address.  It also fixes obscure B&I problems with prebinding
	reported by Matt Reda.

	Note the reason all this is tricky for our projects is that we have a different
	install location for Jaguar and Panther.  The purpose of this arg is to declare
	at link time our eventual location, which allows the prebinding address to be
	found in /AppleInternal/Developer/seg_addr_table.  We use a funky back-tick
	expression within OTHER_LDFLAGS to get a conditional value depending on the
	build train we are in.

	This can all go away once we only build on Panther and don't embed the
	frameworks inside the Safari.app wrapper.

	In addition I fixed the OTHER_LDFLAGS settings in our build styles to be
	additive instead of overriding, so we have the args we used for B&I in force
	when building outside of B&I.

	Reviewed by Maciej.

        * WebCore.pbproj/project.pbxproj:

2003-03-24  David Hyatt  <hyatt@apple.com>

	Clean up isInlineFlow.  Add a couple of new methods that I'll
	be converting code over to use (carefully) piece by piece in
	future patches.
	
        Reviewed by gramps

        * khtml/rendering/render_block.h:
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):
        * khtml/rendering/render_object.h:

2003-03-24  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- fixed 3083339 - significant top and side margin appended to new windows

        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow): Account for distinction between
	frame and content rect.
	* kwq/KWQStyle.h: Return 0 for the appropriate style to avoid
	adding extra padding when making a new window from JavaScript.
        * kwq/WebCoreBridge.h: Prototype new methods.

2003-03-24  David Hyatt  <hyatt@apple.com>

	Fix for crash on www.lnt.com.  3199929 is the bug number.  

	Blocks must have all their kids as inlines or all theirs kids
	as blocks.  Floats and positioned elements are special and
	disregarded when this check occurs.  

	If a float or positioned element suddenly becomes a normal flow
	element again, then the parent block might have to make its kids
	all be non-inline or it might have to wrap a normal flow inline
	with an anonymous block.

	This patch fixed RenderObject's setStyle method to check for
	this situation and to make the parent block fix itself up
	appropriately.
	
        Reviewed by darin

        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):

2003-03-24  David Hyatt  <hyatt@apple.com>

	ignore the float property on first-letter styles.
	The bug # is 3186044.
	
        Reviewed by darin

        * khtml/css/parser.cpp:
        * khtml/rendering/render_block.cpp:

2003-03-24  David Hyatt  <hyatt@apple.com>

	Add error-handling case to deal with a common CSS malformation:

	clip: rect( )

	The bug is 3206171.
	
        Reviewed by darin

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:

2003-03-22  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3203869 -- Monaco 9 looks different in Safari than in TextEdit (uses outline instead of bitmap)

        * kwq/KWQFontMetrics.mm: (QFontMetricsPrivate::getRenderer): Get a new renderer
        if the one we have is wrong printer-vs-screen-wise. For speed, use a global
        variable rather than methods.
        * kwq/KWQPainter.mm: (QPainter::_updateRenderer): Get a new renderer if the
        one we have is wrong printer-vs-screen-wise. For speed, use a global variable
        rather than methods.

        * kwq/KWQTextRendererFactory.h: Added. Exposes a global variable that tells whether we are
        in global "using printer font" mode.
        * kwq/WebCoreTextRendererFactory.h: Added setUsingPrinterFonts: and usingPrinterFonts methods.
        * kwq/WebCoreTextRendererFactory.m:
        (-[WebCoreTextRendererFactory setUsingPrinterFonts:]): Added. Sets global.
        (-[WebCoreTextRendererFactory usingPrinterFonts]): Added. Returns value of global.

        * WebCore.pbproj/project.pbxproj: Added KWQTextRendererFactory.h.

2003-03-22  David Hyatt  <hyatt@apple.com>

	Fix the top of the gamespot.com page on the PLT.  The
	clear status for <br> should be ignored if/when we decide
	to ignore the <br> because the previous line didn't break 
	cleanly.
	
        Reviewed by gramps

        * khtml/rendering/bidi.cpp:

2003-03-22  David Hyatt  <hyatt@apple.com>

	Loosen up the DTD for <dl>, <dt>, and <dd> so that they can
	occur anywhere in a document and be independent of one 
	another.
	
        Reviewed by darin/gramps

        * khtml/html/dtd.cpp:
        (DOM::checkChild):

2003-03-22  David Hyatt  <hyatt@apple.com>

	Bottom border/padding was incorrectly being used in float
        computations.  The fix is trivial... positioning of floats
	occurs before you add in the bottom border/padding rather
        than after.

	Also implementing support for transparent borders and adding
	code that understands how to draw more complex polys when
	individual sides are transparent.  This code existed for left
	and right borders, but not for top and bottom borders.

	These two fixes make the tantek demo found at:

	http://www.tantek.com/map.html

	work properly for the first time in Safari.
	
        Reviewed by darin

        * ChangeLog:
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_object.cpp:
        (RenderObject::paintBorder):
        * khtml/rendering/render_style.h:

2003-03-21  David Hyatt  <hyatt@apple.com>

	Fixes for all 4 macromedia rendering problems.  They were all
	related to buggy float handling.  

	The bugs are 3194998, 3195014, 3915155, 3204114.

	This patch splits floats and positioned elements into two lists
	instead of 1, and it also adds better logic for clearing out
	floats when blocks move vertically.
	
        Reviewed by darin

        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::detach):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::addChildWithContinuation):
        * khtml/rendering/render_inline.cpp:
        (RenderInline::addChildToFlow):
        (RenderInline::nodeAtPoint):
        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):
        (RenderObject::removeFromObjectLists):
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_root.cpp:
        (RenderRoot::layout):
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):

2003-03-21  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3203212 -- nil-deref in khtml::CachedImage::isErrorImage at turbotax.com

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::removeImage): Remove all occurrences
        of the image from the list. We don't try to prevent multiple occurrences from getting
        in there. Also use removeRef instead of remove, for speed.

2003-03-21  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3204660 -- EUC decoding not used for japanese yahoo page

        * khtml/misc/decoder.cpp: (Decoder::decode):
        Do the search for charset= in a case-insensitive way. It's possible that other
        browsers are case-insensitive, but also possible that it's just Japanese
        auto-detect that papers over this problem there.
        
        - other changes
        
        * kwq/KWQString.mm: (QString::hash): Get rid of unnecessary code to avoid hashes of 0.
        This is useful in the place in JavaScriptCore where we copied this from, but
        it is not helpful here (slightly ugly and does slow things down a smidgen).
        
        * kwq/WebCoreTextRendererFactory.m: Remove unused method.

2003-03-20  David Hyatt  <hyatt@apple.com>

	Fix the color handling of link= attributes on <body> elements
	to pass in the quirks mode so that lax parsing can take place.
	
        Reviewed by rjw and john

        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseAttribute):

2003-03-20  Richard Williamson   <rjw@apple.com>

        Use "Item" consistently in the WebHistory and WebBackForwardList.
        Change createSharedHistoryWithFile: to setSharedHistory:
        Make the various page cache methods per WebBackForwardList instead of global.
        
        Reviewed by gramps.

        * kwq/KWQKHistoryProvider.mm:
        * kwq/WebCoreHistory.h:

2003-03-20  David Hyatt  <hyatt@apple.com>

	Always do residual style fixups in all three Safari rendering
	modes.
	
        Reviewed by darin

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::popBlock):

=== Safari-68 ===

2003-03-19  David Hyatt  <hyatt@apple.com>

	Adding a few more tags to the list of ones to check for
	residual style.
	
        Reviewed by gramps

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::isResidualStyleTag):
        (KHTMLParser::isAffectedByResidualStyle):

2003-03-19  David Hyatt  <hyatt@apple.com>

	Fix continuations so that they are smarter about reusing
	anonymous blocks.  Avoids deep nesting when it isn't 
	necessary.

	A complete implementation of the residual style fixes.  It
	seems to fix all current outstanding bugs.

	One of the bugs in the residual style list was caused by
	font-weight not being reset to tables and is actually its
	own problem.  I fixed that by moving the quirks resets for
	table elements into the quirks stylesheet (which should be
	a speed boost).
	
	<b><p>Foo</b> Goo</p>

        Also fixed the huge XML failure issue that made us fail hundreds
        of test cases.  Attachment of text nodes was being done way too
        early, before the text of the node had been determined.  By moving
        the attachment from enterText to exitText, the problem is solved.
        
        Reviewed by darin (res. style fix 1) and gramps (rest of res. style fix and XML fix)

        * khtml/css/quirks.css:
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::attach):
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::isResidualStyleTag):
        (KHTMLParser::isAffectedByResidualStyle):
        (KHTMLParser::handleResidualStyleCloseTagAcrossBlocks):
        (KHTMLParser::reopenResidualStyleTags):
        (KHTMLParser::popBlock):
        (KHTMLParser::popOneBlock):
        * khtml/html/htmlparser.h:
        * khtml/rendering/render_inline.cpp:
        (RenderInline::splitFlow):
        * khtml/xml/xml_tokenizer.cpp:
        (XMLHandler::enterText):
        (XMLHandler::exitText):
	
2003-03-18  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3197684 -- <textarea wrap="hard"> behaves incorrectly (bugzilla)

        By doing the line breaking inside the KWQ class for textarea we can both remove
        the broken lineOfCharAtIndex: method and avoid the n-squared algorithm KHTML uses to
        insert hard line breaks.

        * khtml/rendering/render_form.cpp: (RenderTextArea::text):
        Call textWithHardLineBreaks on widget instead of trying to break lines here.
        
        * kwq/KWQTextEdit.h: Added textWithHardLineBreaks member function. Made text member function
        const. Got rid of text(int), paragraphs, paragraphLength, and lineOfChar member functions.
        * kwq/KWQTextEdit.mm:
        (QTextEdit::text): Made this const, and move code that transforms CRLF and CR into LF
        inside KWQTextArea.
        (QTextEdit::textWithHardLineBreaks): Added. Calls new textWithHardLineBreaks method.

        * kwq/KWQTextArea.h: Added textWithHardLineBreaks method. Removed numLines, textForLine:,
        paragrahs, paragraphLength:, textForParagraph:, and lineOfCharAtIndex: methods.
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea initWithQTextEdit:]): Call [self init] for clarity instead of [super init].
        In both cases, we end up calling [self initWithFrame:].
        (-[KWQTextArea text]): Added logic for transforming CRLF and CR into LF here instead of at
        the KWQTextEdit level.
        (-[KWQTextArea textWithHardLineBreaks]): Added. This method uses the layout manager to extract
        the characters for one line at a time, and put line breaks in between.

2003-03-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3146407 - bring the window with the targeted frame to the front

        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow): If we use an existing frame,
	focus it.
        * kwq/WebCoreBridge.h: Prototype focusWindow method.

2003-03-17  Trey Matteson  <trey@apple.com>

	Support for password saving in forms.  Added elementIsPassword:,
	nuked deadwood formIsLoginForm:.

        Reviewed by Maciej.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::submit):  Pass forms data for login forms and
	password fields to bridge.  This case was skipped for security in
	khtml's autocomplete, but we need this data to save passwords, and
	we enforce policy at a higher level.
        * khtml/html/html_formimpl.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        Nuked formIsLoginForm:.
        (-[WebCoreBridge elementIsPassword:]):  New utility.

2003-03-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3119663 - document.lastModified returns the wrong date format

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):
	Instead of using NSDate's default date format, use the format that
	IE and Gecko use.

2003-03-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): Fix build, use size instead of length.

2003-03-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3080337 - default values seem to be "no" when third param of window.open is an empty string
	
        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): Treat empty string the same as missing for
	third argument - leave all chrome on. Also remove support for
	scrollbars= property

2003-03-18  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3164522 -- text encoding conversion is done a chunk at a time with no state; won't work in some cases
	- fixed 3164557 -- pages served with encoding UTF-16LE but no BOM character won't be decoded correctly
	- fixed 3164569 -- pages without BOM that have a server-specified encoding of utf-16 will fail to decode
	- fixed 3165002 -- can't open link with tilde (~) in page with Japanese encoding
	- fixed 3181297 -- can't open link with backslash (\) in page with Japanese encoding (download at netscape.com)
	- fixed 3182977 -- "unicode" encoding handled as UTF-16 rather than UTF-8 at www.delcom-eng.com

        * khtml/misc/decoder.h: Add an optional "8-bit-only" parameter to the
        setEncoding method.
        * khtml/misc/decoder.cpp:
        (Decoder::setEncoding): Add an "8-bit-only" parameter. Use the new
        codeForNameEightBitOnly method when that parameter is true. Use the new
        usesVisualOrdering constant rather than all the hardcoded logic here to
        tell logical from visual Hebrew encodings.
        (Decoder::decode): Pass true for "8-bit-only" when the encoding came out
        of an HTML header, since we are already parsing the file by this point so
        it makes no sense to use a non-8-bit encoding.
        (Decoder::flush): Pass true for the "flush" parameter when calling the decoder.
        
        * kwq/KWQCharsets.h: Add a new KWQEncodingFlags enum, and return a parameter of
        that type (optionally) from KWQCFStringEncodingFromIANACharsetName.
        * kwq/KWQCharsets.mm:
        (buildDictionaries): Make the dictionaries lead to table entries so we can get
        both the flags and the encoding.
        (KWQCFStringEncodingFromIANACharsetName): Get the flags as well as the encoding.
        (KWQCFStringEncodingToIANACharsetName): Use the new dictionary format.
        (encodingNameHash): Removed special case for hash for 0. This was useful in
        JavaScriptCore where this hash function came from, but it's not relevant for
        a CF hash function.
        
        * kwq/KWQTextCodec.h: Added codecForNameEightBitOnly function to QTextCodec. Added optional
        KWQEncodingFlags parameter to QTextCodec constructor. Replaced isISOLatin1Hebrew with
        usesVisualOrdering. Added == and hash functions to QTextCodec. Added virtual destructor to
        QTextDecoder. Added optional "flush" boolean parameter to QTextDecoder's toUnicode function.
        * kwq/KWQTextCodec.mm:
        (codecForCFStringEncoding): Use both the encoding and the flags as a key for the dictionary
        that holds QTextCodec objects.
        (QTextCodec::codecForName): Pass flags through.
        (QTextCodec::codecForNameEightBitOnly): Added. Maps kCFStringEncodingUnicode to
        kCFStringEncodingUTF8.
        (QTextCodec::codecForLocale): Pass noEncodingFlags.
        (QTextCodec::makeDecoder): Pass flags to KWQTextDecoder constructor.
        (QTextCodec::toUnicode): Pass true for the "flush" boolean parameter to KWQTextDecoder.
        (operator==): Added. Compares both encoding and flags.
        (QTextCodec::hash): Added. Computes a hash of encoding and flags.
        (QTextCodecsEqual): Added. Calls operator==.
        (QTextCodecHash): Added. Calls hash member function.
        (QTextDecoder::~QTextDecoder): Added. Empty.
        (KWQTextDecoder::KWQTextDecoder): Made this no longer inline.
        (KWQTextDecoder::~KWQTextDecoder): Added. Cache the TEC object for use next time.
        (KWQTextDecoder::convertUTF16): Use the flags to decide on big vs. little endian when the
        page does not have a BOM marker that makes it unambiguous.
        (KWQTextDecoder::convertUsingTEC): Added flush parameter. Changed code to reuse the same
        converter for successive convert calls, and only flush when the flush parameter is passed.
        Added code to set the kUnicodeForceASCIIRangeMask. Do it directly since we can't use
        TECSetBasicOptions due to bug 3201405.
        (KWQTextDecoder::toUnicode): Pass flush parameter through.
        
        * kwq/mac-encodings.txt: Added new sections for "Unicode, bigEndian", "Unicode, littleEndian",
        and "ISOLatinHebrew, visualOrdering". Also moved UTF-16 to "Unicode" from "UTF8" since we now
        handle this with the "8-bit-only" mechanism.
        
        * kwq/make-charset-table.pl: Updated script to support flags (after a comma), and made it a bit
        more strict about what to do with ill-formed lines.

        * kwq/KWQCharsetData.c: Regenerated.
        
        - other changes
        
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::searchForLabelsBeforeElement): Take advantage of "using" and remove
        unneeded namespace prefixes.
        (KWQKHTMLPart::matchLabelsAgainstElement): Ditto.
        (KWQKHTMLPart::pauseActions): Ditto.
        (KWQKHTMLPart::resumeActions): Add check for nil to match pauseActions. Also take
        advantage of "using" and remove unneeded namespace prefixes.
        (KWQKHTMLPart::saveWindowProperties): Use ERROR instead of ASSERT for the nil case.
        (KWQKHTMLPart::saveLocationProperties): Use ERROR instead of ASSERT for the nil case.
        (KWQKHTMLPart::restoreWindowProperties): Use ERROR instead of ASSERT for the nil case.
        (KWQKHTMLPart::restoreLocationProperties): Use ERROR instead of printf for the nil case.
        (KWQKHTMLPart::openURLFromPageCache): Take advantage of "using" and remove
        unneeded namespace prefixes.
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Ditto.
        (KWQKHTMLPart::passSubframeEventToSubframe): Ditto.

2003-03-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3196050 - Hang in www.janegoodall.org dynamic menus
	
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::handleLocalEvents): Copy handlers before processing
	them, so we don't go into an infinite loop if a handler adds or
	removes handlers.

2003-03-16  Trey Matteson  <trey@apple.com>

	3198135 - need to fix our projects so SYMROOT is not stripped

	Tweaked stripping options:  B&I build does not COPY_PHASE_STRIP.
	Deployment build still does.
	We strip manually as part of the install that we do ourselves.

        Reviewed by Maciej.

        * WebCore.pbproj/project.pbxproj:

2003-03-14  Richard Williamson   <rjw@apple.com>

        Fixed 3197162.  The regression was introduced with the change
        to preferences.  The old settings API was used to 'reset' the jscript
        other properties of the part.  This effectively always disabled 
        javascript and prevented properties from being restored to the js
        property maps.
        
        Reviewed by trey.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::saveWindowProperties):
        (KWQKHTMLPart::saveLocationProperties):
        (KWQKHTMLPart::restoreWindowProperties):
        (KWQKHTMLPart::restoreLocationProperties):
        (KWQKHTMLPart::openURLFromPageCache):

2003-03-14  David Hyatt  <hyatt@apple.com>

	Make :target match the root element if no #fragment is specified in
	the URL.
	
        Reviewed by john

        * khtml/css/cssstyleselector.cpp:

2003-03-14  Maciej Stachowiak  <mjs@apple.com>

	- fixed 3190846 - REGRESSION: can't use Fidelity NetBenefits account
	
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::updateForNewURL): Treat javascript: URLs as
	about:blank for now.
        (HTMLFrameElementImpl::attach): Likewise.
        * khtml/khtml_part.cpp:
        (KHTMLPart::processObjectRequest): Make sure to send completed() signal
	after signals are connectd in synchronous load case.

2003-03-13  David Hyatt  <hyatt@apple.com>

	Fix for ew.com, hrweb and arstechnica forums.  A <br> should
	not create a nonempty line in the case where the previous line
	didn't break cleanly.  The fix is to have a new boolean that
	tracks how the previous line broke and to have <br> check that
	to figure out if it should set the line to be non-empty.
	
        Reviewed by gramps

        * khtml/rendering/bidi.cpp:

2003-03-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3188209 - REGRESSION: onmouseup handlers not running for most form elements

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::RenderLineEdit): Connect to clicked signal.
        (RenderFileButton::RenderFileButton): Likewise.
        (RenderFileButton::slotClicked): Send clicked through DOM.
        (RenderTextArea::RenderTextArea): Connect to clicked signal.
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::sendConsumedMouseUp): New method to send a
	mouseUp event for this DOM element. Meant for up events consumed
	by AppKit mouseDown: methods that use modal event loops.
        * khtml/rendering/render_replaced.h:
        * kwq/KWQButton.h:
        * kwq/KWQButton.mm:
        (-[KWQButton initWithQButton:]): Moved here from former adaptor class.
        (-[KWQButton action:]): Make sure to send up before click.
        (-[KWQButton mouseDown:]): Record that we are processing a mouse
	event. If no click happened, send the missing up event.
        (QButton::QButton): Use NSButton subclass instead of separate adaptor.
        (QButton::~QButton): Likewise.
        * kwq/KWQFileButton.h:
        * kwq/KWQFileButton.mm:
        (KWQFileButton::KWQFileButton): Initialize clicked signal.
        (KWQFileButton::clicked): Emit clicked signal.
        (-[KWQFileButtonAdapter initWithKWQFileButton:]): Observe Clicked notification too.
        (-[KWQFileButtonAdapter clicked]): Send mouse up and click through DOM.
        * kwq/KWQLineEdit.h:
        * kwq/KWQLineEdit.mm:
        (QLineEdit::QLineEdit): Initialize clicked signal.
        (QLineEdit::clicked): Emit clicked signal.
        * kwq/KWQListBox.mm:
        (QListBox::QListBox): No longer use separate object as delegate and data source.
        (QListBox::~QListBox): No more need to retrieve and release delegate.
        (-[KWQTableView initWithListBox:items:]): 
        (-[KWQTableView mouseDown:]): Record that we are processing a mouse
	event; if no click happens while processing, send the mouse up event
	through the DOM.
        (-[KWQTableView tableViewSelectionDidChange:]): If sending clicked
	and processing a mouse event, send up first.
        * kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView mouseDown:]): Send up and click through DOM
	after calling super.
        * kwq/KWQTextEdit.h:
        * kwq/KWQTextEdit.mm:
        (QTextEdit::QTextEdit): Initialize clicked signal.
        (QTextEdit::clicked): Emit clicked signal.
        * kwq/KWQTextField.mm:
        (-[KWQTextField setPasswordMode:]): initWithQLineEdit: instead of initWithQWidget:
        (-[KWQTextField fieldEditorDidMouseDown:]): Send up and click through DOM.
        (-[KWQSecureTextField initWithQLineEdit:]): Store QLineEdit*, not just QWidget*.
        (-[KWQSecureTextField fieldEditorDidMouseDown:]): Send up and click through DOM.
        * kwq/KWQWidget.h:
        * kwq/KWQWidget.mm:
	(QWidget::sendConsumedMouseUp): Common method for widgets to send
	a mouseUp that has been consumed by mouseDown processing through
	the DOM.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreFirstResponderChanges.h:
        * kwq/WebCoreViewFactory.m:
        * WebCore.exp: Export new string constant.
        * WebCore-combined.exp: Regenerated.

2003-03-13  Richard Williamson   <rjw@apple.com>

        First stage of the WebController -> WebView, WebView -> WebFrameView.
        This change does the WebView -> WebFrameView part of the change.  Also
        changes WebController's inheritance.  It now inherits from NSView.
        
        Reviewed by Maciej.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::nextKeyView):
        * kwq/KWQScrollView.mm:
        * kwq/KWQWidget.mm:
        (QWidget::getOuterView):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge nextKeyViewInsideWebFrameViews]):
        (-[WebCoreBridge previousKeyViewInsideWebFrameViews]):

2003-03-13  Darin Adler  <darin@apple.com>

        - remove mistaken inlining to fix build with newer versions of gcc

        * khtml/rendering/render_object.cpp: (RenderObject::container):
        Don't mark this inline.

2003-03-13  David Hyatt  <hyatt@apple.com>

	This is a fix to stop creating textruns for the whitespace at the
	end of a block.  This is a major line layout bug that leads to the
	height of the last line in a paragraph being wrong, especially when
	<font> tags are used.

	Example of the problem:
	  <div><nobr>foo</nobr> </div>

	The whitespace between the </nobr> and the end of the </div> was
	being counted when it should have been stripped.  The problem was
	an off-by-one error with the endpoint I set up.  I used a position
	of 0, which is inclusive, so I needed a new value that meant
	"Stop on this object and don't include any of it."  I'm using
	UINT_MAX as this special value for the position.
	
        Reviewed by john

        * khtml/rendering/bidi.cpp:
        * khtml/rendering/bidi.h:

2003-03-13  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3197728 -- REGRESSION: crash at http://transitive.com/company.htm

        * khtml/rendering/bidi.cpp: (appendRun): Added an if statement to handle
        the case where obj is 0; the while loop already handled that case.

        - did the "no inlining workaround" needed for newer versions of gcc

        * khtml/css/parser.y: Added #define __inline as we have elsewhere.
        * khtml/css/parser.cpp: Regenerated.

2003-03-13  David Hyatt  <hyatt@apple.com>

	Add color dumping and bgcolor dumping to the render dump tool.
	
        Reviewed by darin

        * kwq/KWQRenderTreeDebug.cpp:
        (operator<<):

2003-03-13  David Hyatt  <hyatt@apple.com>

	Fix for 3193407, crash in CSS parser on www.hixie.ch.  Improved the grammar to
	understand the CSS3 :not selector so that it wouldn't think of that case as an
	error.  Also patched the error handling case that crashed on :not anyway.  Then
	I went ahead and implemented :not (since it was trivial to add once the parser
	was reading it in).
	
        Also fixed the regression that the * selector didn't work.  The new KHTML trunk moved
        away from a tag value of -1 in order to do @namespace support.  Since we aren't really ready
        to take that code yet, I patched our parser.y to treat * like -1 instead of 0xffff.
        
        Implemented support for a couple of new CSS3 selectors, :root and ::selection.  Also :last-child and :only-child.
        
        Fixed a trivial bug (demonstrated in the CSS3 test suite) with the matching of the ~= selector.
 
        Reviewed by darin

        * khtml/css/Makefile.am:
        * khtml/css/css_base.cpp:
        (CSSSelector::extractPseudoType):
        * khtml/css/css_base.h:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/parser.cpp:
        * khtml/css/parser.y:
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_text.cpp:
        (TextRun::paintSelection):
        (RenderText::paintObject):

=== Safari-67 ===

2003-03-13  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3194451 -- Textarea COLS='40.0' displays with width of 0

        * khtml/xml/dom_stringimpl.h: Changed toInt to not be inline any more.
        It was already really too big for inline to be a good optimization.
        * khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::toInt): Rewrote this to
        find the valid characters at the start of the string, rather than strip
        invalid characters from the end. The old code would strip non-digits from
        the end, which doesn't help with a string like "40.0" or even "40 garbage3".

        - fixed a bit of int/long sloppiness
        
        * kwq/KWQString.mm:
        (QString::toLong): Use LONG_MAX, not INT_MAX.
        (QString::toULong): Use ULONG_MAX, not UINT_MAX.

2003-03-12  Richard Williamson   <rjw@apple.com>

        Fixed leak of RenderRoot.
        
        Reviewed by darin.

        * kwq/KWQPageState.mm:
        (-[KWQPageState invalidate]):  Added comment.
        (-[KWQPageState dealloc]):  Ensure that the renderer is "re"set on
        the document so it will be correctly cleaned up in detach.

2003-03-12  David Hyatt  <hyatt@apple.com>

	Two fixes.  The first is more help with macromedia.  Floats could
	get lost and not painted by the correct layer still.  The new
	code is more robust about checking if a layer crossing occurred
	in the case where you want to addOverhangingFloats to a parent.

	The second fix changes the priority of space allocation when
	growing cells from their minwidths to their preferred widths.
	The old code did fixed and then percent.  The new code does
	percent and then fixed.

	Also when tables are overconstrained after growing cells to their
	effective widths, instead of shrinking cells without regard for
	their type, I implemented a shrink system that follows the same
	priority (reversed) that was used when growing the cells originally.
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/table_layout.cpp:
        (AutoTableLayout::layout):

2003-03-12  Trey Matteson  <trey@apple.com>

	3190784 REGRESSION: crash in KWQListIteratorImpl in form completion code at sonyericsson.com page

	Don't crash on an input element with no enclosing form.

        * kwq/WebCoreBridge.mm:
       (-[WebCoreBridge formForElement:]):  Gracefully bail on !form.

2003-03-11  David Hyatt  <hyatt@apple.com>

	Fix for tantek's slides, this is an issue on diveintomark's
	list as well.  <style> was not honoring any media attributes
	set on it, so print stylesheets were being applied to the screen,
	etc.!
	
        Reviewed by rjw

        * khtml/html/html_headimpl.cpp:
        (HTMLStyleElementImpl::childrenChanged):
        * khtml/html/html_headimpl.h:

=== Safari-66 ===

2003-03-11  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3166759 -- two fields both look like they have focus at webmail.iquest.net due to onblur

        * kwq/KWQTextField.mm:
        (-[KWQTextField selectText:]): Don't call -[NSTextField selectText:] in the case where we already
        have an editor, because the NSTextField version will cause the field to relinquish first responder
        and then take it back, which will send both onblur and onfocus.
        (-[KWQSecureTextField selectText:]): Same fix for the secure text field.

2003-03-11  David Hyatt  <hyatt@apple.com>

	Fix the 16000 pixel tall scrollbar on macromedia.com/software.
	vertical-align position hints were being set to bad values.
	
        Reviewed by mjs

        * khtml/rendering/render_object.cpp:
        (RenderObject::getVerticalPosition):

2003-03-10  David Hyatt  <hyatt@apple.com>

	Fix for <pre> regression, bug #3193590, directory listings
	busted.
	
        Reviewed by gramps

        * khtml/rendering/bidi.cpp:

2003-03-10  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3010915 -- mouse wheel won't scroll the main document when you are over [i]frame

        * kwq/WebCoreScrollView.h: Added.
        * kwq/WebCoreScrollView.m: Added. Overrides scrollWheel to "do the right thing".
        * WebCore.pbproj/project.pbxproj: Added WebCoreScrollView, and made it SPI so WebKit can use it.
        * WebCore.exp: Exported WebCoreScrollView so WebKit can use it.
        * WebCore-combined.exp: Regenerated.

        * kwq/KWQListBox.mm: Made KWQListBoxScrollView a subclass of WebCoreScrollView instead of NSScrollView.
        * kwq/KWQTextArea.h: Made KWQTextArea a subclass of WebCoreScrollView instead of NSScrollView.

        - other changes

        * kwq/KWQComboBox.mm: Make the workaround for the position of text in the pop-up
        compile only when we build on Jaguar. That way a Jaguar-built Safari looks perfect on
        Jaguar and a Panther built one looks perfect on Panther.

        * kwq/KWQKHTMLPart.mm: Reformatted some method calls.

2003-03-09  David Hyatt  <hyatt@apple.com>

	Fix compacts and run-ins to work a lot better than they did
	before.  I had some huge misunderstandings with how compact
	worked that have now been clarified.
	
        Reviewed by kocienda

        * khtml/rendering/bidi.cpp:
        * khtml/rendering/bidi.h:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::repaint):
        * khtml/rendering/render_line.cpp:
        (InlineFlowBox::placeBoxesHorizontally):
        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:

2003-03-08  David Hyatt  <hyatt@apple.com>

	Check in the patch I actually meant to land.  Somehow what I landed
	had removed a line that was supposed to be there.
	
        * khtml/css/cssstyleselector.cpp:

2003-03-07  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::submitForm): Fix form submission (was completely broken).

2003-03-07  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- fixed 3127705 - don't open new window on opt-click even if the link requests it
	- fixed 3143971 - cmd-click should override the target="_blank" and target="_new" (important for tabs)
	
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURL): Don't use findOrCreateFrameNamed, instead pass target along.
        (KWQKHTMLPart::openURLRequest): Likewise.
        (KWQKHTMLPart::submitForm): Likewise.
        (KWQKHTMLPart::urlSelected): Likewise.
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow): Likewise.
        * kwq/WebCoreBridge.h:

2003-03-07  David Hyatt  <hyatt@apple.com>

        better fix for text-decoration issue on time.com.  
	
        Reviewed by mjs

        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_style.h:

2003-03-07  David Hyatt  <hyatt@apple.com>

	Fix for time.com regression.  Don't allow text-decoration to
	apply to anchor elements with no href.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:

2003-03-07  David Hyatt  <hyatt@apple.com>

	Whoops. Fix regression causedb y previous checkin.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:

2003-03-07  David Hyatt  <hyatt@apple.com>

	Make the :hover:active behavior much more sophisticated
	(and make it match WinIE, since that buggy browser is what
	necessitates this hack).
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:

2003-03-06  David Hyatt  <hyatt@apple.com>

	Fix for 3156125, regression on hiptop.com.  Caused by better
	nowrap handling perversely enough.  Need another quirk from
	Moz/WinIE to make this site behave.
	
        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTableCell::calcMinMaxWidth):
        (RenderTableCell::setStyle):

2003-03-06  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3191027 -- REGRESSION: KWQColor assert at aol.com front page

        * kwq/KWQColor.mm: (qRgb): Clamp to [0,0xFF] instead of asserting.

2003-03-06  Trey Matteson  <trey@apple.com>

	Refinement of routine that scans the DOM for field labels.
	We skip nodes that have no renderer, or are invisible.

        Reviewed by hyatt.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::searchForLabelsBeforeElement): Added check.

2003-03-06  David Hyatt  <hyatt@apple.com>

	Fix for 3190580, tables should reset line-height and white-space
	in quirks mode.
	
        Reviewed by trey and john

        * khtml/css/quirks.css:

=== Safari-65 ===

2003-03-06  Darin Adler  <darin@apple.com>

        Reviewed by Don.

        - fixed 3177862 -- REGRESSION: can't upload widget at www.konfabulator.com

        * khtml/html/html_formimpl.cpp:
        (fixUpfromUnicode): Add a call to fixLineBreaks here (and move this down below that function).
        (HTMLFormElementImpl::formData): Remove the call to fixLineBreaks here, which was being used
        on non-text form data, like files being uploaded.

2003-03-05  Trey Matteson  <trey@apple.com>

	Autofill tweak.  In field names, replace all digits with spaces before matching
	labels against them.  This turns the digits to word boundaries, so field names like
	"address2" are matched by "address".

	As part of this, I abandoned an earlier attempt to map Qt regexp syntax to Darwin's.
	Now clients just have to use Darwin's.

        Reviewed by Maciej.

        * kwq/KWQKHTMLPart.mm:
        (regExpForLabels):
        (KWQKHTMLPart::matchLabelsAgainstElement):  Replace digits with space.
        * kwq/KWQRegExp.mm:
        (QRegExp::KWQRegExpPrivate::compile):  Don't try to support Qt syntax.

2003-03-05  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3189442 -- REGRESSION: utf-16-little-endian.html crashes making decoder

        * kwq/KWQCharsets.mm: (encodingNameHash): Re-add tolower call to hash function to
        match the equality function.

2003-03-04  Trey Matteson  <trey@apple.com>

	New support for autofill.  We provide a routine that scans backwards in the text
	before a given element, looking for a match with a set of labels.  In addition,
	we provide for a similar match against the element's name.

	To implement a few more methods in QRegExp API were implemented.

        Reviewed by Maciej.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (scanForForm):  Remove redundant call to a helper function.
        (regExpForLabels):  Return a regexp used to search for the set of labels.
        (KWQKHTMLPart::searchForLabelsBeforeElement):  Walk the DOM to scan backwards
	in the text before the element, apply regexp to the text we find.
        (KWQKHTMLPart::matchLabelsAgainstElement):  Get the element name, use regexp
	to check it for any of the labels.
        * kwq/KWQRegExp.h:
        * kwq/KWQRegExp.mm:
        (QRegExp::KWQRegExpPrivate::KWQRegExpPrivate):  Init two new ivars.
        (RegExpFromPattern):  Massage a non-glob expression before handing to Darwin.
        (QRegExp::KWQRegExpPrivate::compile):  Call RegExpFromPattern.
        (QRegExp::match):  Set new ivars based on match result.
        (QRegExp::search):  New API, just call match.
        (QRegExp::searchRev):  New API, call match repeatedly to (weakly) simulate a 
	reverse search.
        (QRegExp::pos):  Return info from last result.
        (QRegExp::matchedLength):  Return info from last result.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge searchForLabels:beforeElement:]):  Call straight through to part.
        (-[WebCoreBridge matchLabels:againstElement:]):  Call straight through to part.

2003-03-04  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - got rid of some framework initialization (working on bug 3188781)

        * khtml/khtml_part.cpp:
        (KHTMLPart::setZoomFactor): Put some waitCursor use inside #if !APPLE_CHANGES.
        (KHTMLPart::reparseConfiguration): Put some waitCursor use inside #if !APPLE_CHANGES.
        
        * khtml/rendering/render_frames.cpp: (RenderFrameSet::userResize): Use KCursor cursors
        instead of Qt cursors.

        * kwq/KWQNamespace.h: Remove Qt cursors.
        * kwq/KWQCursor.mm: Remove Qt cursors.
        * kwq/KWQKCursor.h: Remove waitCursor.
        * kwq/KWQKCursor.mm: Remove waitCursor.

2003-03-04  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed build rules for parser.cpp so we don't rebuild it every time

        * khtml/css/Makefile.am: Changed target to parser.cpp, not parser.

        - some QColor cleanup

        * kwq/KWQColor.h: Removed the qRgba function, the unused KWQColor constructor
        that takes a QString parameter, and made the KWQColor constructor that takes a
        const char * parameter explicit.
        * kwq/KWQColor.mm:
        (QColor::QColor): Use findColor directly so we don't create and then destroy a QString.
        (QColor::setNamedColor): Eliminated the unnecessary special case for empty string.
        Get rid of the call to lower(), which is now handled by the caller. Got rid of the
        "can't decipher this color" ERROR, which makes little sense now that non-named colors
        (like hex ones) are handled at the KHTML level. Don't use setRgb to set the color,
        since the RGB value in the gperf table is already in the correct format to just be
        stored in QColor::color.

        * khtml/misc/helper.h: Removed now-unused setNamedColor function. I'm sure this
        same change exists on the KHTML trunk (since the CSS parser rewrite).
        * khtml/misc/helper.cpp: More of the same.
        
        * khtml/misc/loader.cpp: #if !APPLE_CHANGES the places that use qRgba to set
        bgColor, which we don't use anyway.

2003-03-03  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- upgrade to new hash function in one spot that I missed:

        * kwq/KWQString.mm:
        (QString::hash): Use spiffy new hash algorithm.

2003-03-01  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3163855 - Need control over certain potential dialogs/sheets

        * khtml/rendering/render_form.cpp:
        (RenderFileButton::RenderFileButton): Pass the part to KWQFileButton.
        * kwq/KWQFileButton.h:
        * kwq/KWQFileButton.mm:
        (KWQFileButton::KWQFileButton): Go through the bridge for the view,
	not the view factory.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::runJavaScriptAlert): Go through the bridge for the panel,
	not the view factory.
        (KWQKHTMLPart::runJavaScriptConfirm): Likewise.
        (KWQKHTMLPart::runJavaScriptPrompt): Likewise.
        * kwq/WebCoreViewFactory.h: Move methods from here...
        * kwq/WebCoreBridge.h: ...to here.

2003-03-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	Updated string hash function to match the new, improved one in
	JavaScriptCore.
	
        * kwq/KWQCharsets.mm:
        (encodingNameHash):

2003-03-03  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3187518 -- REGRESSION: w3c css sample page crashes in cssyyparse

        * khtml/css/parser.y: (selector): Added code to handle the case where simple_selector is 0.
        * khtml/css/parser.cpp: Regenerated.
        
        - fixed regression I introduced earlier today where ID anchors wouldn't work
        
        * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor):
        Check by ID first explicitly before using DOC_ANCHORS.

        * WebCore.pbproj/project.pbxproj: Add parser.y to the project to make it easier to open it.

2003-03-03  David Hyatt  <hyatt@apple.com>

	Fix for 3185852, crash when dynamically inserting rules because
	of an unitialized parser variable.
	
        Reviewed by darin

        * khtml/css/css_ruleimpl.cpp:
        (CSSMediaRuleImpl::insertRule):
        * khtml/css/css_stylesheetimpl.cpp:
        (CSSStyleSheetImpl::insertRule):
        * khtml/css/cssparser.cpp:
        (CSSParser::parseRule):
        * khtml/css/cssparser.h:

2003-03-03  David Hyatt  <hyatt@apple.com>

	Clean up dynamic ID/CLASS setting/removal.  Make ID actually
	work when set dynamically.  Fixes bug 3173050.
	
        Reviewed by john

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::parseAttribute):

2003-03-03  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3154394 -- non-repro nil-dereference in DOM::HTMLFormElementImpl::submit

        * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::submit):
        Add checks for nil like the other methods in this file have.

        - fixed some types to remove a bit of unnecessary overhead

        * khtml/ecma/kjs_window.h: Change types.
        * khtml/ecma/kjs_window.cpp:
        (Window::installTimeout): Change parameter to UString, not Identifier.
        (WindowFunc::tryCall): Pass the UString, not Identifier.
        (ScheduledAction::ScheduledAction): Change parameter to use const QString & to avoid
        a bit of overhead.
        (WindowQObject::installTimeout): Change parameter to UString, not Identifier.

2003-03-03  David Hyatt  <hyatt@apple.com>

	I messed up when i merged Lars' quirks color patch for CSS with
	my original patch.  I'm now exactly matching Lars' patch, and this
	now fixes bug 3181185.
	
        Reviewed by darin

        * khtml/css/cssparser.cpp:
        (CSSParser::parseColor):

2003-03-03  David Hyatt  <hyatt@apple.com>

	Fix for 3179084.  Fix is to just dump our code so that the new
	addHTMLColor code kicks in.  This code is very close to WinIE
	on more-colortests.html.
	
        Reviewed by darin

        * ChangeLog:
        * kwq/KWQColor.mm:
        (QColor::setNamedColor):

2003-03-03  David Hyatt  <hyatt@apple.com>

	Fix for 3178361, <th> don't draw borders.   Boneheaded mistake
	on my part.  Just forgot to include it along with <td> in the
	CSS hack for sharing cell rules.
	
        Reviewed by rjw

        * khtml/css/cssstyleselector.cpp:

2003-03-03  Richard Williamson   <rjw@apple.com>

        Fix build oops from last checkin to khtml/html/html_formimpl.cpp.
        
        Reviewed by trey

        * khtml/html/html_formimpl.cpp:
        (encodeCString):

2003-03-03  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3183445 -- hang in QCString::length reloading page with lots of text in textarea

        * khtml/html/html_formimpl.cpp: (encodeCString): Compute string length only once outside the loop
        to avoid being O(n^2) in the size of the string.

2003-03-03  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed 3180364 -- infinite loop in JavaScript at www.vw.dk (due to document.anchors problem) leads to hang

        The underlying problem was that our document.anchors had all the anchors in it.
        But here's what the Gecko DOM reference documentation says about document.anchors:
        "For reasons of backwards compatibility, the returned set of anchors only contains
        those anchors created with the name attribute, not those created with the id attribute."

        * khtml/html/html_miscimpl.cpp:
        (HTMLCollectionImpl::calcLength): Include only A elements with NAME attributes in the DOC_ANCHORS case.
        (HTMLCollectionImpl::getItem): Ditto.
        (HTMLCollectionImpl::getNamedItem): Ditto.

2003-03-02  Trey Matteson  <trey@apple.com>

	Use a KWQPopUpButton in place of NSPopUpButton.  The only addition is that
	it implements the KWQWidgetHolder protocol.  This is needed in order to
	auto set PopUps during autofill. 

        Reviewed by Maciej.

        * kwq/KWQComboBox.mm:
        (QComboBox::QComboBox):  Make a KWQPopUpButton instead of NSPopUpButton.
        (QComboBox::~QComboBox):  trivial s/KWQPopUpButton/NSPopUpButton/
        (QComboBox::insertItem): ditto
        (QComboBox::sizeHint): ditto
        (QComboBox::baselinePosition): ditto
        (QComboBox::clear): ditto
        (QComboBox::setCurrentItem): ditto
        (QComboBox::currentItem): ditto
        (-[KWQPopUpButtonCell widget]):  Also implement KWQWidgetHolder
        (-[KWQPopUpButton widget]):  Implement KWQWidgetHolder by calling our cell.

2003-02-28  Darin Adler  <darin@apple.com>

        * khtml/css/parser.y: Fixed bad check-in that broke the build in a subtle way.
        * khtml/css/parser.cpp: Regenerated.

2003-02-28  Trey Matteson  <trey@apple.com>

	More support for autofill, autocomplete.

	Pass the form element along with the values to WK when submitting.

	isLoginForm looks for a single plain text field along with password fields, so as not to match registration forms.

	Added means to find the "current" form on a page.

	Added means to return the whole set of controls on a form.

        Reviewed by Darin.

        * khtml/html/html_elementimpl.h:
	Added isGenericFormElement().
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::isLoginForm):  See above.
        (HTMLFormElementImpl::submit):  Also register form when registering values,
	so it will be sent over bridge.
        * kwq/KWQKHTMLPart.h:  New ivar to save form along with form values to be submitted.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):  Init _formAboutToBeSubmitted ivar.
        (KWQKHTMLPart::~KWQKHTMLPart):  Free _formAboutToBeSubmitted ivar.
        (KWQKHTMLPart::openURL):  Pass form to bridge along with values.
        (KWQKHTMLPart::openURLRequest):   Pass form to bridge along with values.
        (scanForForm):  Helper function to scan forward in the DOM for a form.
        (KWQKHTMLPart::currentForm):  Returns current form.
        (KWQKHTMLPart::clearRecordedFormValues): Clear _formAboutToBeSubmitted.
        (KWQKHTMLPart::recordFormValue): Record _formAboutToBeSubmitted too.
        (KWQKHTMLPart::submitForm): Pass form to bridge along with values.
        (KWQKHTMLPart::urlSelected):  Pass form to bridge along with values.
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow): Pass form to bridge along with values.
        * kwq/KWQTextField.mm:
        (-[KWQTextField setStringValue:]):
	Call textChanged so the changes actually make it to khtml.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (viewForElement):  New helper.
        (formElementFromDOMElement):    New helper.
        (-[WebCoreBridge formIsLoginForm:]):
	Changed API to operate on a form instead of a field.
        (-[WebCoreBridge currentForm]):  New method, described above.
        (-[WebCoreBridge controlsInForm:]):  New method, described above.
        * kwq/WebCoreDOMNode.mm:
        (-[WebCoreDOMNode isEqual:]):
	Implement this to == compare the element we contain.
        (-[WebCoreDOMNode hash]):  Implement to hash element ptr we contain.

2003-02-28  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3180170 - filepile.com does not work correctly

	I fixed this by making referrer work correctly for targetted
	cross-frame and cross-window links. It is still not working right
	for JavaScript window.open though.

        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): Add some FIXMEs about not handling referrer right.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURL): Pass referrer.
        (KWQKHTMLPart::openURLRequest): Pass referrer.
        (KWQKHTMLPart::submitForm): Pass referrer.
        (KWQKHTMLPart::urlSelected): Pass referrer.
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow): Pass referrer.
        * kwq/WebCoreBridge.h: Ad referrer argument to loadURL:

2003-02-28  David Hyatt  <hyatt@apple.com>

	Exclude <BR>s from the text-dec check.  Really fixes 3185121.
	
        Reviewed by john

        * khtml/rendering/render_line.cpp:
        (shouldDrawDecoration):

2003-02-28  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed some storage leaks; this code is still leaking when we run cvs-base

        * khtml/css/parser.y:
        (import): Use the new maybe_media_list (ported from KDE), and delete the
        media list if the current item we are parsing is not a style sheet.
        (maybe_media_list): Added. (ported from KDE).
        (media_list): Added error case so we don't leak in that case (ported from KDE).
        (media): Use media_list instead of media_list2 (ported from KDE).
        (selector_list): Added error case so we don't leak in that case (ported from KDE).
        (selector): Added error case so we don't leak in that case (ported from KDE).
        (simple_selector): Added nil-checking (ported from KDE).
        (element_name): Use 0xFFFF instead of -1 (ported from KDE).
        (specifier_list): Added error case so we don't leak in that case (ported from KDE).
        (declaration): Delete the expr if we don't use it because property is 0.
        (expr): Added error case so we don't leak in that case (ported from KDE).

        * khtml/css/cssparser.cpp:
        (CSSParser::parseSheet): Delete the rule in case one was created.
        (CSSParser::parseRule): Zero out the rule after extracting it to return.
        (CSSParser::parseValue): Delete the rule in case one was created.
        (CSSParser::parseDeclaration): Delete the rule in case one was created.

        * khtml/css/parser.cpp: Regenerated.

2003-02-28  David Hyatt  <hyatt@apple.com>

	Fix for text-dec regression, 3185121.
	
        Reviewed by john

        * khtml/rendering/render_line.cpp:
        (shouldDrawDecoration):

=== Safari-64 ===

=== Safari-63 ===

2003-02-26  David Hyatt  <hyatt@apple.com>

	Additional cleanup.  Don't need the arg to be a reference param
	any more.
	
        Reviewed by mjs

        * khtml/rendering/render_object.cpp:
        (RenderObject::getTextDecorationColors):
        * khtml/rendering/render_object.h:

2003-02-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed reproducible hang at http://asp.eltonsoft.dk/cast/get.asp?cat=Quicktime

	This was a set of mutually recursive frameset pages. This allows
	the number of frames to grow huge, which kills both WebCore and
	WebKit, so I added a hard limit of 200 total frames per page.
	
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::isURLAllowed):
        (HTMLFrameElementImpl::attach):
        (HTMLFrameElementImpl::detach):
        (HTMLIFrameElementImpl::attach):
        * khtml/html/html_baseimpl.h:
        * khtml/khtml_part.cpp:
        (KHTMLPart::init):
        (KHTMLPart::incrementFrameCount):
        (KHTMLPart::decrementFrameCount):
        (KHTMLPart::topLevelFrameCount):
        * khtml/khtml_part.h:

2003-02-26  David Hyatt  <hyatt@apple.com>

	Fix numerous regressions with text-decoration in quirks mode and
	also fixed a bug where text-decoration:none is not being honored
	on links.
	
        Reviewed by mjs

        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_object.cpp:
        (RenderObject::getTextDecorationColors):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.cpp:
        (TextRun::paintDecoration):

2003-02-26  David Hyatt  <hyatt@apple.com>

	Fix for 3179109. containingBlock() had a big old bug in it.
	For ABSOLUTE positioned elements, it would return inline relative
	positioned parents (when it should only be returning blocks).
	
        Reviewed by john

        * khtml/rendering/render_object.cpp:
        (RenderObject::containingBlock):

2003-02-25  David Hyatt  <hyatt@apple.com>

	Fix for findNextLayer problems.  There was nothing wrong with
	findNextLayer per se... it was just getting called *way* more
	often than it needed to be.

	Fixes two bugs, 3159866 and 3168815.
	
        Reviewed by darin

        * khtml/rendering/render_container.cpp:
        (RenderContainer::appendChildNode):
        (RenderContainer::insertChildNode):
        * khtml/rendering/render_object.cpp:
        (addLayers):
        (RenderObject::addLayers):
        * khtml/rendering/render_object.h:

2003-02-25  Darin Adler  <darin@apple.com>

        Reviewed by Trey.
        
        - fixed 3177139 -- REGRESSION: tiny buttons with no text on dbaron test page
        
        This is actually a shortcoming in XML support. The reason it seemed like a regression
        is that this page was parsed as HTML before we had the XML support.
        
        * khtml/xml/xml_tokenizer.cpp:
        (XMLHandler::startElement): As the HTML tokenizer/parser does, call init() on all DOM
        tree elements before calling attach(). The KHTML guys want to get rid of init(), but until
        they do, we need the same thing here as in the HTML version.
        (XMLHandler::startCDATA): Ditto.
        (XMLHandler::enterText): Ditto.

        * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): Fix an obvious editing error that
        would lead to a second attach.

2003-02-25  David Hyatt  <hyatt@apple.com>

	Revert one of my optimizations.  It was bogus.  You can't use
	the parsed value of "inherit." 

	Fixes versiontracker.  Bug #3178204
	
        Reviewed by mjs

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::createSharedCellDecls):

2003-02-25  David Hyatt  <hyatt@apple.com>

	reverseRuns was buggy and crashing.  3182658.
	
        Reviewed by mjs

        * khtml/rendering/bidi.cpp:

2003-02-25  David Hyatt  <hyatt@apple.com>

	Regression caused by my inclusion of inline flows in the bidi 
	iteration.  These flows are always empty and should be skipped
	if found at the start of a line.

	The bug # is 3175670.
	
        * khtml/rendering/bidi.cpp:

2003-02-25  David Hyatt  <hyatt@apple.com>

	Fix for bug 3166276.  <tt> uses wrong font size inside a table.
	Make sure logical font values like "medium" don't set the "size
	specified" bit on the font, so that the generic family change
	code will get activated.
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:

2003-02-25  Darin Adler  <darin@apple.com>

        Reviewed by me, changes by Dave.

        - fixed 3181790 -- REGRESSION: TextRun objects of length 0 or with just the character '\n' leak

        * khtml/rendering/render_text.cpp: (RenderText::position): Destroy the passed-in
        TextRun if it's the kind that's not needed, rather than just returning.

        - fixed 3181794 -- REGRESSION: objects created by RenderObject::createInlineBox leak
        	        
        * khtml/rendering/render_box.cpp: (RenderBox::position): Only do work for replaced
        elements, and for those elements, destroy the passed-in InlineBox. Dave says this
        is not the real solution, but it does plug the leak.
        
        * khtml/rendering/render_flow.cpp: (RenderFlow::createInlineBox): Call through
        to the inherited createInlineBox for all replaced elements. This code was making
        the wrong kind of InlineBox for replaced elements.
        
        - removed Id cvs magic string which causes big headaches in generated files

        * khtml/css/parser.cpp: Removed Id cvs magic string.
        * khtml/css/parser.y: Removed Id cvs magic string.

2003-02-24  David Hyatt  <hyatt@apple.com>

	The new CSS1 parser, implementation of attr(), improvement of
	the content property, impl of the :target selector, and new
	dotted/dashed line drawing code for borders.
	
        Reviewed by darin/gramps

        * ForwardingHeaders/css/css_base.h: Added.
        * WebCore.pbproj/project.pbxproj:
        * khtml/css/Makefile.am:
        * khtml/css/css_base.cpp: Added.
        (StyleBaseImpl::checkLoaded):
        (StyleBaseImpl::stylesheet):
        (StyleBaseImpl::baseURL):
        (StyleBaseImpl::setParsedValue):
        (StyleListImpl::~StyleListImpl):
        (CSSSelector::print):
        (CSSSelector::specificity):
        (CSSSelector::extractPseudoType):
        (CSSSelector::operator == ):
        (CSSSelector::selectorText):
        * khtml/css/css_base.h: Added.
        * khtml/css/css_ruleimpl.cpp:
        (CSSRuleImpl::parentRule):
        (CSSImportRuleImpl::CSSImportRuleImpl):
        (CSSImportRuleImpl::~CSSImportRuleImpl):
        (CSSImportRuleImpl::setStyleSheet):
        (CSSImportRuleImpl::init):
        (CSSMediaRuleImpl::CSSMediaRuleImpl):
        (CSSMediaRuleImpl::append):
        (CSSMediaRuleImpl::insertRule):
        (CSSStyleRuleImpl::setDeclaration):
        (CSSStyleRuleImpl::setNonCSSHints):
        * khtml/css/css_ruleimpl.h:
        * khtml/css/css_stylesheetimpl.cpp:
        (CSSStyleSheetImpl::CSSStyleSheetImpl):
        (CSSStyleSheetImpl::insertRule):
        (CSSStyleSheetImpl::cssRules):
        (CSSStyleSheetImpl::parseString):
        (MediaListImpl::deleteMedium):
        * khtml/css/css_stylesheetimpl.h:
        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::getPropertyValue):
        (CSSStyleDeclarationImpl::get4Values):
        (CSSStyleDeclarationImpl::getShortHandValue):
        (CSSStyleDeclarationImpl::getPropertyCSSValue):
        (CSSStyleDeclarationImpl::removeProperty):
        (CSSStyleDeclarationImpl::getPropertyPriority):
        (CSSStyleDeclarationImpl::setProperty):
        (CSSStyleDeclarationImpl::setLengthProperty):
        (CSSPrimitiveValueImpl::CSSPrimitiveValueImpl):
        (CSSPrimitiveValueImpl::cleanup):
        (CSSPrimitiveValueImpl::computeLength):
        (CSSPrimitiveValueImpl::computeLengthFloat):
        (CSSPrimitiveValueImpl::setFloatValue):
        (CSSPrimitiveValueImpl::cssText):
        (FontFamilyValueImpl::FontFamilyValueImpl):
        (FontValueImpl::FontValueImpl):
        (FontValueImpl::~FontValueImpl):
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        (qFatal):
        (ValueList::ValueList):
        (ValueList::~ValueList):
        (ValueList::addValue):
        (CSSParser::CSSParser):
        (CSSParser::~CSSParser):
        (CSSParser::parseSheet):
        (CSSParser::parseRule):
        (CSSParser::parseValue):
        (CSSParser::parseDeclaration):
        (CSSParser::addProperty):
        (CSSParser::createStyleDeclaration):
        (CSSParser::clearProperties):
        (CSSParser::document):
        (validUnit):
        (CSSParser::parseShortHand):
        (CSSParser::parse4Values):
        (CSSParser::parseContent):
        (CSSParser::parseShape):
        (CSSParser::parseFont):
        (CSSParser::parseFontFamily):
        (parseColor):
        (CSSParser::parseColor):
        (yyerror):
        (DOM::CSSParser::lex):
        (toHex):
        (DOM::CSSParser::text):
        * khtml/css/cssparser.h:
        * khtml/css/cssproperties.c:
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/css/html4.css:
        * khtml/css/parser.cpp: Added.
        (DOM::getPropertyID):
        (getValueID):
        (cssyyerror):
        (cssyylex):
        (__yy_memcpy):
        * khtml/css/parser.h: Added.
        * khtml/css/parser.y: Added.
        * khtml/css/quirks.css: Added.
        * khtml/css/tokenizer.cpp: Added.
        * khtml/css/tokenizer.flex: Added.
        * khtml/dom/css_value.h:
        * khtml/dom/html_element.cpp:
        * khtml/ecma/kjs_css.cpp:
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseAttribute):
        * khtml/html/html_blockimpl.cpp:
        (HTMLDivElementImpl::parseAttribute):
        (HTMLHRElementImpl::attach):
        (HTMLParagraphElementImpl::parseAttribute):
        * khtml/html/html_elementimpl.cpp:
        (isHexDigit):
        (toHex):
        (HTMLElementImpl::addHTMLColor):
        * khtml/html/html_elementimpl.h:
        * khtml/html/html_inlineimpl.cpp:
        (HTMLFontElementImpl::parseAttribute):
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::parseAttribute):
        (HTMLTableElementImpl::attach):
        (HTMLTablePartElementImpl::parseAttribute):
        (HTMLTableCellElementImpl::parseAttribute):
        * khtml/khtml_part.cpp:
        (KHTMLPart::gotoAnchor):
        * khtml/misc/helper.h:
        * khtml/rendering/render_body.cpp:
        (RenderBody::setStyle):
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::lineHeight):
        (RenderListMarker::baselinePosition):
        * khtml/rendering/render_style.cpp:
        (RenderStyle::setContent):
        * khtml/rendering/render_style.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        (DocumentImpl::setFocusNode):
        (DocumentImpl::setCSSTarget):
        (DocumentImpl::getCSSTarget):
        * khtml/xml/dom_docimpl.h:
        * kwq/KWQChar.mm:
        (QChar::upper):
        * kwq/KWQColor.h:
        * kwq/KWQKStandardDirs.mm:
        (locate):
        * kwq/KWQPainter.mm:
        (QPainter::drawLine):
        * kwq/KWQString.h:

2003-02-24  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3167642 - crash in renderArena.
	
        * khtml/html/html_documentimpl.h:
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::HTMLDocumentImpl): Added new processingLoadEvent bool.
        (HTMLDocumentImpl::close): Guard against re-entering the load event handler.

2003-02-24  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3179059 -- CSS1: capitalized letters should remain capitalized when
        text-transform: capitalize is applied

        * khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::capitalize): Capitalize the first
        letters of words, but don't make any letters lowercase.

2003-02-23  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3179181 -- KURL won't accept URLs with a query part and no / separating host name from path

        * kwq/KWQKURL.mm: (KURL::parse): Allow any path segment end character to end the host part of a
        URL, rather than allowing only a "/".

2003-02-21  Maciej Stachowiak  <mjs@apple.com>

        Back out last change, mondo layout regressions.

        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::close):

2003-02-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 3167642 - crash in renderArena.

        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::close): Clear the tokenizer early to avoid
	re-entering the onload handler - this was causing a massive
	overload of frames which finally caused a crash.

2003-02-21  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed a problem that was causing layout tests to give inconsistent results

        * kwq/KWQPixmap.mm:
        (QPixmap::size): Handle case of nil image so we don't use the uninitialized
        result of dispatching a method to a structure-returning function.
        (QPixmap::rect): Ditto.
        (QPixmap::width): Ditto.
        (QPixmap::height): Ditto.

2003-02-21  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - Made it possible to run the layout tests in a Deployment version

        * kwq/KWQRenderTreeDebug.cpp: (externalRepresentation): Remove #ifndef NDEBUG.
        * kwq/KWQRenderTreeDebug.h: Remove #ifndef NDEBUG.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge renderTreeAsExternalRepresentation]):
        Remove #ifndef NDEBUG.

2003-02-21  Darin Adler  <darin@apple.com>

        * kwq/KWQRenderTreeDebug.cpp: (write): Add missing spaces in render
        tree dump format.

2003-02-20  Maciej Stachowiak  <mjs@apple.com>

        Revert Dave's patch to these files, since it turned out to cause
	layout regressions.

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):
        * khtml/rendering/render_object.cpp:
        (RenderObject::setLayouted):
        (RenderObject::container):

2003-02-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin Adler.

	- fixed 3173276 - hang in kjs string at iteslj.org page

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::addPending): Leave whitespace unmolested inside
	<script>, so that literal tabs in strings come through as tabs,
	not spaces.

2003-02-20  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

        - fixed 3177310 -- REGRESSION: "serif" mapped to "fixed"
        
        Fixed a typo where the serif method was returning the fixed font name.
        Also made this class use inlining for almost everything -- yields a miniscule
        improvement in code size and speed, and increases brevity.

        * kwq/KWQKHTMLSettings.h: Moved almost everything here.
        * kwq/KWQKHTMLSettings.mm: Moved almost everything out of here.

2003-02-19  David Hyatt  <hyatt@apple.com>

	Update layers to not fix their positions during setLayouted.
	Inline container() within render_object.cpp so setLayouted can
	use it inline.
	
        Reviewed by mjs

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):
        * khtml/rendering/render_object.cpp:
        (RenderObject::setLayouted):
        (RenderObject::container):

2003-02-19  David Hyatt  <hyatt@apple.com>

	Just chain BidiRuns using an internal next ptr and dump the
	use of QPtrList (which has to malloc internal nodes to wrap
	each run).
	
        Reviewed by darin (reverseRuns reviewed by mjs)
	
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/bidi.h:
        * khtml/rendering/render_block.h:

2003-02-19  David Hyatt  <hyatt@apple.com>

	Make the BidiIterator midpoints use an array instead of a list.
	
        Reviewed by kocienda

	* khtml/rendering/bidi.h
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.h:

2003-02-18  Maciej Stachowiak  <mjs@apple.com

	Reviewed by Chris.
	
	Merged changes from Safari-58-1-branch.
	
    2003-02-11  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

        * WebCore.pbproj/project.pbxproj: Include /System/Library/PrivateFrameworks.

2003-02-18  Trey Matteson  <trey@apple.com>

	3171982 - REGRESSION: onClick handlers run twice when button pressed (DSLReports.com forums)

	My earlier changes added the codepath by which we let khtmlview fully process
	a mouse up after a widget has done it's tracking, which leads to the second
	onClick call.  Presumably that path does not exist in the native KDE case.
	The change below reduces the impact of my hack, whereby instead of fully posting
	a fake mouseup, we just note that the mouse has done up at the end of mousedown
	handling, and clear the mousePressed state (state I also added).

        Reviewed by Darin.

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMousePressEvent):  Look for a current mouseUp at the end of
	dispatching the mouse down.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
	Don't post a phony mouse up from here.
        (KWQKHTMLPart::lastEventIsMouseUp):
	Utility routine to test for mouseUp.

=== Safari-62 ===

2003-02-18  David Hyatt  <hyatt@apple.com>

	Fix for 3176102, bad table cell regression.  I was adding in
	random properties for cells. Eep.

	Also patched table element to add in the inherit property using
	CSS_VAL_INHERIT instead of the string "inherit" (faster).
	
        Reviewed by gramps

        * khtml/css/cssstyleselector.cpp:
        * khtml/html/html_tableimpl.cpp
	
2003-02-18  David Hyatt  <hyatt@apple.com>

	Fix for 3171795, dotted borders drawn incorrectly.  Picked this
	gem up from the KHTML trunk.
	
        Reviewed by darin

        * khtml/rendering/render_object.cpp:
        (RenderObject::drawBorder):

2003-02-17  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3174332 -- REGRESSION: bad initial layout due to empty QFontMetrics

        * khtml/rendering/render_html.cpp: (RenderHtml::setStyle):
        Don't set the style's to display:BLOCK if it's display:NONE. This prevents
        us from modifying the special FOUC style among other things.

        - unrelated code cleanup

        * khtml/html/html_baseimpl.cpp: Moved code around that was grouped badly.

2003-02-17  David Hyatt  <hyatt@apple.com>

	Missed another "Almost Strict" spot.
	
        Reviewed by kocienda

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::recalcStyle):

2003-02-17  David Hyatt  <hyatt@apple.com>

	Fix for 3% improvement on cached cvs-base.  Make cells share the
	declarations set up by the table (add these decls to the table
	once instead of to every cell).
	
        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::HTMLTableElementImpl):
        (HTMLTableElementImpl::~HTMLTableElementImpl):
        (HTMLTableElementImpl::createSharedCellDecls):
        (HTMLTableCellElementImpl::getAdditionalStyleDecls):
        (HTMLTableCellElementImpl::attach):
        * khtml/html/html_tableimpl.h:
        * khtml/xml/dom_elementimpl.h:

2003-02-17  Trey Matteson  <trey@apple.com>

	2938062 Mouse cursor does not change to link cursor over non-button form submission controls
	
        Reviewed by Darin

        * khtml/khtmlview.cpp:
        (isSubmitImage):  Helper function to ID submit buttons with images.
        (KHTMLView::viewportMouseMoveEvent):  Set cursor for submit buttons with images.
        * kwq/WebCoreBridge.mm:
        (inputElementFromDOMElement):  Simplify previously written casting goop.

2003-02-16  David Hyatt  <hyatt@apple.com>

	Fix "Almost Strict" mode to not match @konq-quirks.
	
        Reviewed by kocienda

        * ChangeLog:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        (DocumentImpl::recalcStyleSelector):

2003-02-16  David Hyatt  <hyatt@apple.com>

	Fix to make table cells within the same table use a shared style 
	decl object (owned by the table).  This stops every cell in a table
	from having the exact same values copied on the cell itself.
	
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::HTMLTableElementImpl):
        (HTMLTableElementImpl::~HTMLTableElementImpl):
        (HTMLTableElementImpl::createSharedCellDecls):
        (HTMLTableCellElementImpl::getAdditionalStyleDecls):
        (HTMLTableCellElementImpl::attach):
        * khtml/html/html_tableimpl.h:
        * khtml/xml/dom_elementimpl.h:

2003-02-14  David Hyatt  <hyatt@apple.com>

	Make the inline box model live.  Borders/backgrounds and text
	decorations have been rewritten.

	Also fixed a bug with clip rects.  They didn't include borders.

        Reviewed by kocienda

        * khtml/css/cssstyleselector.cpp:
        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall):
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/font.cpp:
        * khtml/rendering/font.h:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::paintBackground):
        (RenderBox::paintBackgroundExtended):
        (RenderBox::getClipRect):
        (RenderBox::position):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::createInlineBox):
        (RenderFlow::paintLineBoxBackgroundBorder):
        (RenderFlow::paintLineBoxDecorations):
        (RenderFlow::repaint):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_inline.cpp:
        (RenderInline::paintObject):
        (RenderInline::width):
        (RenderInline::height):
        (RenderInline::offsetLeft):
        (RenderInline::offsetTop):
        (RenderInline::nodeAtPoint):
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_line.cpp:
        (InlineFlowBox::verticallyAlignBoxes):
        (InlineFlowBox::computeLogicalBoxHeights):
        (InlineFlowBox::placeBoxesVertically):
        (InlineFlowBox::shrinkBoxesWithNoTextChildren):
        (InlineFlowBox::paintBackgroundAndBorder):
        (shouldDrawDecoration):
        (InlineFlowBox::paintDecorations):
        * khtml/rendering/render_line.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):
        (RenderObject::lineHeight):
        (RenderObject::getTextDecorationColors):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_root.cpp:
        (enclosingPositionedRect):
        * khtml/rendering/render_style.cpp:
        (StyleVisualData::StyleVisualData):
        (StyleInheritedData::StyleInheritedData):
        (StyleInheritedData::operator==):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_table.cpp:
        (RenderTableCell::repaintRectangle):
        * khtml/rendering/render_text.cpp:
        (TextRun::paintDecoration):
        (TextRun::checkSelectionPoint):
        (RenderText::nodeAtPoint):
        (RenderText::cursorPos):
        (RenderText::absolutePosition):
        (RenderText::paintObject):
        (RenderText::paint):
        (RenderText::position):
        * khtml/rendering/render_text.h:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::drawLineForText):
        * kwq/WebCoreTextRenderer.h:

2003-02-13  Trey Matteson  <trey@apple.com>

	First checkin for working forms autocomplete.

	This level has some new support routines.

        Reviewed by Chris

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::isLoginForm):  New, returns if a form is for login.
        * khtml/html/html_formimpl.h:
        * kwq/KWQDOMNode.cpp:
        (idFromNode):  New, helper routine to allow us to use the id() function from ObjC.
        * kwq/KWQDOMNode.h:
        * kwq/KWQTextArea.h:  Adopt KWQWidgetHolder protocol.
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea widget]):    Adopt KWQWidgetHolder protocol.
        (-[KWQTextAreaTextView widget]):    Adopt KWQWidgetHolder protocol.
        * kwq/KWQTextField.h:    Adopt KWQWidgetHolder protocol.
        * kwq/KWQTextField.mm:
        (-[KWQTextField widget]):    Adopt KWQWidgetHolder protocol.
        (-[KWQSecureTextField widget]):    Adopt KWQWidgetHolder protocol.
        * kwq/KWQView.h:  Define KWQWidgetHolder protocol
        * kwq/KWQView.mm:  
        (-[KWQView widget]): Adopt KWQWidgetHolder protocol.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementForView:]):   New method.
        (inputElementFromDOMElement):  Common code for next two methods.
        (-[WebCoreBridge elementIsInLoginForm:]):   New method.
        (-[WebCoreBridge elementDoesAutoComplete:]):   New method.

2003-02-13  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

        - fixed 3162806 -- REGRESSION: handle == h assertion when clicking headphone link at cnn.com

        * khtml/ecma/kjs_window.cpp: (HistoryFunc::tryCall): Instead of trying to actually do the
        history navigation here, call the new KHTMLPart::scheduleHistoryNavigation.

        * khtml/khtml_part.cpp:
        (KHTMLPart::init): Add a few more #if !APPLE_CHANGES so we can leave out more unused fields.
        (KHTMLPart::openURL): Ditto.
        (KHTMLPart::createJavaContext): Ditto.
        (KHTMLPart::clear): Also initialize m_scheduledRedirection to noRedirectionScheduled.
        (KHTMLPart::checkCompleted): Use m_scheduledRedirection rather than m_redirectURL to check
        whether a redirection is already in progress.
        (KHTMLPart::scheduleRedirection): Use m_scheduledRedirection rather than m_redirectURL to check
        whether a redirection is already in progress, and set m_scheduledRedirection to redirectionScheduled.
        (KHTMLPart::scheduleHistoryNavigation): Added. Does the same thing as scheduleRedirection,
        but always uses a delay of 0, sets m_scheduledRedirection to historyNavigationScheduled, and
        sets m_scheduledHistoryNavigationSteps.
        (KHTMLPart::slotRedirect): Add an if statement that does the history navigation. The code is
        moved here from HistoryFunc::tryCall. Also set m_scheduledRedirection to noRedirectionScheduled.
        (KHTMLPart::urlSelected): Add a few more #if !APPLE_CHANGES so we can leave out more unused fields.
        (KHTMLPart::requestObject): Ditto.
        (KHTMLPart::submitForm): Ditto.
        (KHTMLPart::slotParentCompleted): Use m_scheduledRedirection rather than m_redirectURL to check
        whether a redirection is already in progress.
        (KHTMLPart::setZoomFactor): Add a few more #if !APPLE_CHANGES so we can leave out more unused fields.

        * khtml/khtml_part.h: Added scheduleHistoryNavigation.
        * khtml/khtmlpart_p.h: Added RedirectionScheduled enum. Added more #if !APPLE_CHANGES to leave out
        a bunch more fields we don't use. Added m_scheduledRedirection and m_scheduledHistoryNavigationSteps.
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::redirectionTimerStartedOrStopped): Check and don't do anything
        if the timer was being used for history redirection.

        * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
        Check m_scheduledRedirection instead of m_redirectURL to figure out if there is a redirection
        in progress. Not strictly necessary since we really don't care about the history case here,
        but consistent with the rest.

2003-02-13  Chris Blumenberg  <cblu@apple.com>

        Fixed WebKit typos found by Peter Wilson.

        Reviewed by darin.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::bridgeForFrameName): call findOrCreateFrameNamed
        * kwq/WebCoreBridge.h: fixed method name for findOrCreateFrameNamed

2003-02-12  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3158484 -- after submission failure, submitting a second time doesn't work

        * kwq/KWQKHTMLPart.h: Added didNotOpenURL method. Changed _formSubmittedFlag bool
        into _submittedFormURL string.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): No need to initialize string.
        (KWQKHTMLPart::didNotOpenURL): If the form we submitted failed, then forget about it.
        (KWQKHTMLPart::submitForm): Only do the protection against multiple submissions if
        the URL is the same.
        (KWQKHTMLPart::setView): Nuke the submitted URL here where we used to nuke the flag.

        * kwq/WebCoreBridge.h: Added didNotOpenURL: method to be called by WebKit.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge didNotOpenURL:]): Forward the call to the part.

2003-02-12  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

        - fixed 3162786 -- hang with large amounts of text in textarea

        * kwq/KWQTextArea.mm: (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]):
        Rewrite to not use RangeOfParagraph to avoid n^2 algorithm. Also made small
        changes to similar functions so they look similar, and got rid of an int/unsigned
        mismatch in a case where the value is guaranteed to be positive.

2003-02-11  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3170403 -- nil-dereference in addEventListener

        * khtml/ecma/kjs_dom.cpp: (DOMNodeProtoFunc::tryCall): Check getJSEventListener result for nil.
        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check getJSEventListener result for nil.

2003-02-11  Trey Matteson  <trey@apple.com>

	Set -seg1addr in our build styles, but not for the B&I build.
	This makes our SYMROOTS from B&I usable to determine symbols from crash
	logs from the field.
	Also nuked DeploymentFat build style.

        Reviewed by Ken.

        * WebCore.pbproj/project.pbxproj:

2003-02-10  David Hyatt  <hyatt@apple.com>

	Inline box model landing, stage 1.  Doesn't really change
	much of anything visually yet.  Just builds a bunch of boxes
	and positions them, but those boxes aren't used yet.

	Also fixing repaint() to understand not to dirty outside
	overflow:hidden clipped ancestors.

	Fixed two table bugs in table painting as well.
	
        Reviewed by kocienda

        * WebCore.pbproj/project.pbxproj:
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/bidi.h:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::position):
        (RenderBox::repaintRectangle):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::addChild):
        (RenderFlow::deleteLineBoxes):
        (RenderFlow::detach):
        (RenderFlow::createInlineBox):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_image.cpp:
        (RenderImage::paintObject):
        * khtml/rendering/render_inline.cpp:
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_line.cpp: Added.
        (InlineBox::detach):
        (throw):
        (InlineBox::operator delete):
        (InlineFlowBox::marginLeft):
        (InlineFlowBox::marginRight):
        (InlineFlowBox::marginBorderPaddingLeft):
        (InlineFlowBox::marginBorderPaddingRight):
        (InlineFlowBox::getFlowSpacingWidth):
        (InlineFlowBox::nextOnLineExists):
        (InlineFlowBox::prevOnLineExists):
        (InlineFlowBox::onEndChain):
        (InlineFlowBox::determineSpacingForFlowBoxes):
        (InlineFlowBox::placeBoxesHorizontally):
        (InlineFlowBox::verticallyAlignBoxes):
        (InlineFlowBox::adjustMaxAscentAndDescent):
        (InlineFlowBox::computeLogicalBoxHeights):
        (InlineFlowBox::placeBoxesVertically):
        * khtml/rendering/render_line.h: Added.
        * khtml/rendering/render_object.cpp:
        (RenderObject::createInlineBox):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        * khtml/rendering/render_replaced.h:
        * khtml/rendering/render_table.cpp:
        (RenderTableSection::paint):
        (RenderTableCell::repaintRectangle):
        (RenderTableCell::paint):
        * khtml/rendering/render_table.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::nodeAtPoint):
        (RenderText::paintObject):
        (RenderText::height):
        (RenderText::createInlineBox):
        (RenderText::position):
        (RenderText::width):
        (RenderText::metrics):
        * khtml/rendering/render_text.h:
        * khtml/xml/dom_docimpl.h:

2003-02-10  Darin Adler  <darin@apple.com>

        Reviewed by Richard.

        - fixed 3124596 -- failures handling URLs with non-ASCII characters in them

        * khtml/xml/dom_docimpl.h: Add an m_decoder field.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl): Initialize m_decoder to 0.
        (DocumentImpl::completeURL): Pass the QTextCodec from m_decoder to KURL if present.

        * khtml/khtml_part.cpp:
        (KHTMLPart::begin): Set the decoder on the document when we make the document if we have a decoder.
        (KHTMLPart::write): Set the decoder on the document when we make the decoder if we have a document.
        (KHTMLPart::completeURL): Remove APPLE_CHANGES; we handle the encoding in the document.

        * kwq/KWQKURL.h: Removed "encoding hint" parameters. Add a QTextCodec parameter to the
        relative URL constructor, which is the one used when we deal with links on a page.
        * kwq/KWQKURL.mm: (KURL::KURL): Decode the relative string based on the QTextCodec parameter.

        * kwq/KWQString.h: Added isAllASCII, good for detecting when it's safe to use latin1()
        or ascii() without worrying about character sets.
        * kwq/KWQString.mm: (QString::isAllASCII): Added.

        * WebCore-tests.exp: Updated for changes in KURL API.
        * WebCore-combined.exp: Regenerated.

        - other changes

        * khtml/rendering/render_table.cpp: (RenderTableCell::setWidth): Add an assertion that will help
        us notice future overflow issues.

        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Rolled out the APPLE_CHANGES here that
        were intended to cope with the lack of window.history, which we now have. While KHTML's rule may
        not be the correct rule, this will now work as well in Safari as in Konqueror.

2003-02-07  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3145899 -- tf1.fr page marked UTF-8 is being decoded as Latin-1 (due to <noscript> before <meta>)

        * khtml/misc/decoder.cpp: (Decoder::decode): Add NOSCRIPT to the list of tags
        that are allowed before META tags that specify character sets.

        - fixed 3144214 -- treat Big5 as Windows CP 950 the same way TEC does

        * kwq/mac-encodings.txt: Move Big5 names to kCFStringEncodingDOSChineseTrad
        instead of kCFStringEncodingBig5.
        * kwq/KWQCharsetData.c: Regenerated.

2003-02-07  Richard Williamson   <rjw@apple.com>

        Changes to support per WebController preferences.
        KHTMLPart now always accesses preferences from it's m_setting.
        Changes made to WebPreferences pass to WebCoreSetting to KTMLSettings.
        Added JavaScriptCanOpenWindowsAutomatically to KHTMLSettings.
        
        Reviewed by Maciej and Ken.

        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall):
        * khtml/khtml_part.cpp:
        (KHTMLPart::init):
        (KHTMLPart::restoreURL):
        (KHTMLPart::openURL):
        (KHTMLPart::begin):
        (KHTMLPart::reparseConfiguration):
        * khtml/khtmlpart_p.h:
        * kwq/KWQKConfigBase.h:
        * kwq/KWQKConfigBase.mm:
        (KConfig::readUnsignedNumEntry):
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setSettings):
        * kwq/KWQKHTMLSettings.h:
        * kwq/KWQKHTMLSettings.mm:
        (KHTMLSettings::stdFontName):
        (KHTMLSettings::fixedFontName):
        (KHTMLSettings::serifFontName):
        (KHTMLSettings::sansSerifFontName):
        (KHTMLSettings::cursiveFontName):
        (KHTMLSettings::fantasyFontName):
        (KHTMLSettings::minFontSize):
        (KHTMLSettings::mediumFontSize):
        (KHTMLSettings::mediumFixedFontSize):
        (KHTMLSettings::isJavaEnabled):
        (KHTMLSettings::autoLoadImages):
        (KHTMLSettings::isPluginsEnabled):
        (KHTMLSettings::isJavaScriptEnabled):
        (KHTMLSettings::JavaScriptCanOpenWindowsAutomatically):
        (KHTMLSettings::userStyleSheet):
        (KHTMLSettings::setStdFontName):
        (KHTMLSettings::setFixedFontName):
        (KHTMLSettings::setSerifFontName):
        (KHTMLSettings::setSansSerifFontName):
        (KHTMLSettings::setCursiveFontName):
        (KHTMLSettings::setFantasyFontName):
        (KHTMLSettings::setMinFontSize):
        (KHTMLSettings::setMediumFontSize):
        (KHTMLSettings::setMediumFixedFontSize):
        (KHTMLSettings::setAutoLoadImages):
        (KHTMLSettings::setIsJavaScriptEnabled):
        (KHTMLSettings::setIsJavaEnabled):
        (KHTMLSettings::setArePluginsEnabled):
        (KHTMLSettings::setJavaScriptCanOpenWindowsAutomatically):
        (KHTMLSettings::setUserStyleSheet):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge init]):
        (-[WebCoreBridge initializeSettings:]):
        * kwq/WebCoreSettings.h:
        * kwq/WebCoreSettings.mm:
        (-[WebCoreSettings dealloc]):
        (-[WebCoreSettings init]):
        (-[WebCoreSettings setStandardFontFamily:]):
        (-[WebCoreSettings setFixedFontFamily:]):
        (-[WebCoreSettings setSerifFontFamily:]):
        (-[WebCoreSettings setSansSerifFontFamily:]):
        (-[WebCoreSettings setCursiveFontFamily:]):
        (-[WebCoreSettings setFantasyFontFamily:]):
        (-[WebCoreSettings setMinimumFontSize:]):
        (-[WebCoreSettings setDefaultFontSize:]):
        (-[WebCoreSettings setDefaultFixedFontSize:]):
        (-[WebCoreSettings setJavaEnabled:]):
        (-[WebCoreSettings setPluginsEnabled:]):
        (-[WebCoreSettings setJavaScriptEnabled:]):
        (-[WebCoreSettings setJavaScriptCanOpenWindowsAutomatically:]):
        (-[WebCoreSettings setWillLoadImagesAutomatically:]):
        (-[WebCoreSettings setUserStyleSheetLocation:]):
        (-[WebCoreSettings userStyleSheetLocation]):
        (-[WebCoreSettings settings]):

2003-02-07  Darin Adler  <darin@apple.com>

        * khtml/rendering/render_table.h: Added copyright date.
        * khtml/rendering/render_table.cpp: Added copyright date.

2003-02-07  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3165171 -- REGRESSION: images overlap text

        * khtml/rendering/table_layout.cpp: (AutoTableLayout::calcEffectiveWidth):
        Change to distribute space to the fixed columns first so the code to distribute to non-fixed columns does not
        assume it can distribute more to the fixed columns than it really can.

2003-02-07  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3167025 -- REGRESSION: http://www.buypcdirect.com doesn't wrap correctly b/c of huge cell width value

        * khtml/rendering/table_layout.h: Make the fields in the Layout structure used in table
        width computations use int instead of short.
        * khtml/rendering/table_layout.cpp:
        (FixedTableLayout::calcMinMaxWidth): Make sure we don't overflow m_minWidth or m_maxWidth in case the
        specified fixed width value is huge.
        (FixedTableLayout::layout): Use ints for the calcWidth array instead of shorts.
        (AutoTableLayout::calcMinMaxWidth): Clamp both maxWidth and minWidth to 0x7fff to match the other code in
        this file, rather than using 10000.

2003-02-06  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3140738 -- textarea contents are LF delimited instead of CRLF

        * khtml/html/html_formimpl.cpp:
        (encodeCString): Turn CR followed by something other than LF into CRLF.
        (fixLineBreaks): Added. Turns stray CRs and LFs into CRLF.
        (HTMLFormElementImpl::formData): Call fixLineBreaks on form data.

        - fixed 3167235 -- REGRESSION: assert after clicking on a link on radioslack.com

        * kwq/KWQTextCodec.mm: (KWQTextDecoder::toUnicode): Return the null string
        if the passed in string pointer is NULL, rather than asserting.

2003-02-06  David Hyatt  <hyatt@apple.com>

	Fix rollingstone regression.
	
        Reviewed by mjs

        * khtml/rendering/render_object.cpp:
        (RenderObject::setLayouted):

2003-02-06  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3166693 -- REGRESSION: infinite recursion in makeFirstResponder while tabbing as page loaded

        Because we now deliver blur events, we are triggering a handler on this page that changes focus.
        It triggered an infinite loop because setFocus kept setting the focus back to a text field, which
        then changed the focus to its editor. The fix was to make QWidget::setFocus smarter about editors.

        * kwq/KWQTextField.mm: (-[KWQTextField becomeFirstResponder]): Don't do any changes in responder until
        after calling KWQKHTMLPart::setDocumentFocus, since that can change focus away. If it does, return NO.

        * kwq/KWQWidget.h: Add hasFocus, remove virtual from setFocus and clearFocus.
        * kwq/KWQWidget.mm:
        (QWidget::hasFocus): Added. Moved code to check if a particular view is first responder here.
        Here's the bug fix too, check if the first responder is this widget's view's editor, and if so return true.
        (QWidget::setFocus): Do nothing if this widget already has focus.
        (QWidget::clearFocus): Do nothing if this widget does not have focus.

2003-02-06  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3161953 -- crash in KWQListImpl, DOM::CSSStyleSheetImpl::isLoading on XML page

        The problem is that this page has some non-HTML elements, but the code was checking
        only the element ID, not whether it is HTML or not. Also fixed the page's layout.

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyleSelector):
        Check that the node is an HTML element before checking the ID in two places.
        Without this, we cast the pointer to the wrong type and trash memory.

        * khtml/rendering/render_root.cpp:
        (RenderRoot::layout): Set all the children false here, not just firstChild.
        (RenderRoot::docHeight): Take all the children's heights into account, not just firstChild.
        (RenderRoot::docWidth): Take all the children's widths into account, not just firstChild.

2003-02-06  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3165295 -- Hang while triple clicking on page

        Flaws in the continuation logic we added to checkSelectionPoint made it take
        exponential time on pages with a lot of continuations.

        * khtml/rendering/render_object.h: Make checkSelectionPoint non-virtual, and
        added virtual checkSelectionPointIgnoringContinuations.
        * khtml/rendering/render_object.cpp:
        (RenderObject::checkSelectionPoint): Added. Does the inline continuation part of
        the render object walking process, which we only want to do at the top level,
        since otherwise we will see the same nodes multiple times. Also optimizes by only
        looking at the inline continuations of inlines, not any continuations of a block.
        (RenderObject::checkSelectionPointIgnoringContinuations): This is now the virtual
        function that is overriden by RenderText. It is identical to the old version of
        checkSelectionPoint, minus the continuation logic.

        * khtml/rendering/render_text.h: Changed the name of checkSelectionPoint to
        checkSelectionPointIgnoringContinuations.
        * khtml/rendering/render_text.cpp: (RenderText::checkSelectionPointIgnoringContinuations):
        Changed the name, and nothing else.

        - fixed my build which was crashing on load

        * WebCore.pbproj/project.pbxproj: Change seg1addr from 2200000 to 9000000.

2003-02-05  Trey Matteson  <trey@apple.com>

	3137647 - ad frames get their own history entries at channels.netscape.com	
	3133844 - 2 items in back list at http://www.kiup-bank.com/personal/main01.html

	The logic for deciding whether new entries are added to history is moved here
	from WebKit.  The advantage is that we can take specific action in each of the
	relevant cases instead of the half-informed guessing WK was doing.

	Here is what we now use for the lockHistory param to scheduleRedirect():

	document.location = XXX  	-    !userGesture
	window.location = XXX		-    !userGesture
	window.open			-    false
	window.replace			-    true
	window.reload			-    true
	meta equiv http-refresh		-    delay <= 1
	http-refresh			-    delay <= 1

        Reviewed by Maciej, Darin.

        * khtml/ecma/kjs_binding.cpp:
        (ScriptInterpreter::wasRunByUserGesture):  Rename of previous isWindowOpenAllowed(),
	since we know use it for multiple purposes.
        * khtml/ecma/kjs_binding.h:
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::putValue):  Assignment to document.location locks history
	if not a result of a user gesture.
        * khtml/ecma/kjs_window.cpp:
        (Window::put):  Assignment to window.location locks history
	if not a result of a user gesture.
        (WindowFunc::tryCall):  Adopt rename to wasRunByUserGesture().
        (Location::put):  Assignment to window.location locks history
	if not a result of a user gesture.
        * khtml/khtml_part.cpp:
        (KHTMLPart::receivedFirstData):  http-refreshes lock history if the timeout<1
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::processHttpEquiv):  http-refreshes lock history if the timeout<1


2003-02-04  Trey Matteson  <trey@apple.com>

	Pass formValues up through the bridge at submit time.

        Reviewed by Maciej

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::submit):  Tell KWQPart about the form values, instead of
	talking to the khtmlview.
        * kwq/KWQKHTMLPart.h:  New ivar to store formValues.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):  Init ivar
        (KWQKHTMLPart::~KWQKHTMLPart):  Free ivar
        (KWQKHTMLPart::openURL):  Pass nil formValues
        (KWQKHTMLPart::openURLRequest):    Pass nil formValues
        (KWQKHTMLPart::clearRecordedFormValues):  Clear saved formValues
        (KWQKHTMLPart::recordFormValue):  Record a name/value
        (KWQKHTMLPart::submitForm):  Pass along recorded formValues
        (KWQKHTMLPart::urlSelected):    Pass nil formValues
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow):    Pass nil formValues
        * kwq/WebCoreBridge.h:  New params for formValues

2003-02-05  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3165682 -- REGRESSION: assertion failure in appendChildNode loading cnn.com

        * khtml/rendering/render_table.cpp: (RenderTable::addChild):
        Get rid of double-addChild introduced when I carelessly rolled in a change
        from the KHTML guys.

2003-02-05  David Hyatt  <hyatt@apple.com>

	Fix for 3164949.  My fix to make form controls actually obey
	display settings in CSS exposed a bug in the html4.css 
	stylesheet.  SELECT had been set to be display: block, which
	is of course just plain wrong.
	
        Reviewed by darin

        * khtml/css/html4.css:

2003-02-05  Richard Williamson   <rjw@apple.com>

        Cleanup public WebHistory API, stage 1.
        
        Reviewed by trey.

        * kwq/KWQKHistoryProvider.mm:
        * kwq/WebCoreHistory.h:
        * kwq/WebCoreHistory.m:
        (+[WebCoreHistory setHistoryProvider:]):
        (+[WebCoreHistory historyProvider]):

2003-02-04  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3164850 -- REGRESSION: query URLs are broken

        Mea culpa. The KURL test in the Tests directory failed last time, but for
        some reason I didn't notice that when I ran it, perhaps due to the other
        failing tests.

        * kwq/KWQKURL.mm: (appendEscapingBadChars): Don't escape '?' even though
        it is in the "bad character" set, since this is a more-lenient definition
        of bad character. Also fixed a buffer overrun bug in the '%'-sequence-preserving
        code, which is a second way this function is lenient. We still get the speed
        because most characters this routine processes are not bad characters.
        (KURL::encode_string): Instead of calling appendEscapingBadChars, put in
        a strict version of the escaping loop that does not tolerate pre-existing
        '%' sequences or '?' characters.

2003-02-04  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - rolled in table code fix from Dirk on the khtml-dev list

        * khtml/rendering/render_table.cpp: (RenderTable::addChild):
        Change return back to break.

2003-02-04  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - we say goodbye to "MIB numbers"

        * khtml/misc/decoder.cpp:
        (Decoder::Decoder): Get the Latin-1 codec using a name.
        (Decoder::setEncoding): Detect the Hebrew encoding using isISOLatin1Hebrew()
        instead of MIB number.
        (Decoder::decode): Get the UCS-2 codec using a name. Redo APPLE_CHANGES so
        we don't get the MIB-number-based workaround for a bug in QTextCodec that
        KWQ doesn't have. Get the Latin-1 codec using a name.
        * khtml/misc/loader.cpp:
        (CachedCSSStyleSheet::CachedCSSStyleSheet): Get the Latin-1 codec using a name.
        (CachedScript::CachedScript): Get the Latin-1 codec using a name.
        
        * kwq/KWQCharsets.h: Remove the two MIB-related functions.
        * kwq/KWQCharsets.mm: Remove the MIB number from the character set table struct.
        Remove the MIB-related dictionary globals and functions.
        (buildDictionaries): Remove code to set up the MIB-related dictionaries.

        * kwq/KWQTextCodec.h: Remove codecForMib, mibEnum, and encoding member functions.
        Add isISOLatin1Hebrew member function.
        * kwq/KWQTextCodec.mm:
        (QTextCodec::makeDecoder): Pass in the encoding when making KWQTextDecoder rather
        than passing in the QTextCodec object.
        (QTextCodec::toUnicode): Ditto.
        (QTextCodec::isISOLatin1Hebrew): Return true for kCFStringEncodingISOLatinHebrew only.
        (KWQTextDecoder::convertUsingTEC): Get encoding directly instead of from a QTextCodec.
        (KWQTextDecoder::toUnicode): Ditto.

        * kwq/make-charset-table.pl: Don't write out MIB numbers.
        * kwq/KWQCharsetData.c: Regenerated.

        * khtml/khtml_part.cpp: (KHTMLPart::completeURL):
        Don't bother passing the MIB number to KURL. Soon, we'll have to
        do something smart here, but we won't use MIB numbers.

        * kwq/mac-encodings.txt: Added more 16-bit Unicode character set names.
        Updated some comments.

2003-02-04  David Hyatt  <hyatt@apple.com>

	Patch calcInlineMaxWidth to add in left/right margins/borders/padding
	separately (since the inline could break across multiple lines).
	
        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        (RenderBlock::calcInlineMinMaxWidth):

2003-02-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * WebCore.pbproj/project.pbxproj: Updated to build the framework
	standalone instead of embedded when doing a B&I build for Panther.

2003-02-04  David Hyatt  <hyatt@apple.com>

	Patch #1: Compacts are supposed to use their maximum intrinsic width
	when determining if they will fit.  I was wrongly using the
	minwidth (i.e., being too aggressive about trying to squeeze
	the compact in there).

	Also yanking the setMaxWidth/MinWidth setters, since I'm not
	using them any more.
	
        Reviewed by kocienda

	Patch #2: Implement an iterator for min/max width calculations
	of blocks with inline children.  This iterator will include
	inline flows twice (with a bool flag indicating whether you're at the
	start or end of the flow).

	Reviewed by darin
	
        * khtml/rendering/render_block.cpp:
        (RenderBlock::layoutBlockChildren):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_object.h:

2003-02-04  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3142813 -- Safari displays a blank page when trying to open html file encoded in little-endian UTF-16

        * kwq/KWQString.h: Remove fromStringWithEncoding and convertToQCString,
        add append that takes a QChar * and length.
        * kwq/KWQString.mm:
        (QString::fromUtf8): Use QTextCodec instead of fromStringWithEncoding.
        (QString::append): Implement by calling insert.

        * kwq/KWQTextCodec.h: Added an encoding() member function to QTextCodec
        and made QTextDecoder an abstract base class to pave the way for putting
        more state in it to handle multibyte encodings.
        * kwq/KWQTextCodec.mm: Add KWQTextDecoder, a concrete subclass of QTextDecoder.
        (codecForCFStringEncoding): Moved the static inside this function for clarity.
        (QTextCodec::makeDecoder): Make a KWQTextDecoder.
        (QTextCodec::toUnicode): Make a KWQTextDecoder and use it do the decoding instead
        of calling fromStringWithEncoding.
        (KWQTextDecoder::convertUTF16): Added. Decodes Unicode, using the BOM to decide
        whether it's little-endian or big-endian.
        (KWQTextDecoder::convertUsingTEC): Added. Here's where the code from
        QString::fromStringWithEncoding was moved. This needs to be changed to handle
        state between multiple buffers passed in eventually, but not to fix this bug.
        (KWQTextDecoder::toUnicode): Added. Calls convertUTF16 or convertUsingTEC.

        * kwq/WebCoreBridge.mm: (+[WebCoreBridge stringWithData:textEncoding:]):
        Use QTextCodec instead of fromStringWithEncoding.

        * khtml/misc/decoder.cpp: (Decoder::decode): Rearranged the #if to make
        things easier to read.

2003-02-04  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

        - fixed 3150252 -- files with question marks in their names fail to upload as attachments

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::formData): Don't include a Content-Type header at all if we don't
        have a MIME type to send. Matches other web browsers' behavior.
        (HTMLInputElementImpl::encoding): Construct the URL using setPath rather than just passing
        a filename to the KURL constructor.
        (HTMLSelectElementImpl::state): Tweak #if formatting a bit.
        (HTMLSelectElementImpl::restoreState): Improve comment a bit.
        * kwq/KWQKURL.mm: Make ? be a "bad character". I checked carefully to be sure this does
        not adversely affect any calls, including running our KURL tests.
        (KURL::setPath): Encode the passed-in path. I determined this was correct both by looking
        at all the call sites in KHTML code to see that they would want this behavior, and by noticing
        that the path() getter decodes the path.

2003-02-04  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

        Radar 3142922 (file URLs should never be sent as referrers)

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge referrer]): Check that the referrer does not start with
	the prefix "file:". If it does, return nil.

2003-02-03  David Hyatt  <hyatt@apple.com>

	Fix for 3163603, livepage.apple.com repaints entire page.
	
        Reviewed by darin.

        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):

2003-02-03  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3133902 -- leaked render objects from makeChildrenNonInline (4 after running cvs-base)

        * khtml/rendering/render_block.cpp: (RenderBlock::removeChild):
        Deatch the anonymous block after emptying it out.

2003-02-03  David Hyatt  <hyatt@apple.com>

	Fix for livepage.apple.com crash.  The bug # is
	3163508.
	
        Reviewed by darin

        * khtml/rendering/render_box.cpp:
        (RenderBox::setPos):

2003-02-03  David Hyatt  <hyatt@apple.com>

	Rename TextSlave to TextRun.
	
        Reviewed by darin

        * khtml/khtml_part.cpp:
        (firstRunAt):
        (lastRunAt):
        (startAndEndLineNodesIncludingNode):
        * khtml/rendering/bidi.cpp:
        (RenderBlock::layoutInlineChildren):
        * khtml/rendering/render_text.cpp:
        (TextRun::detach):
        (throw):
        (TextRun::operator delete):
        (TextRun::paintSelection):
        (TextRun::paintDecoration):
        (TextRun::paintBoxDecorations):
        (TextRun::checkSelectionPoint):
        (TextRunArray::TextRunArray):
        (TextRunArray::compareItems):
        (TextRunArray::findFirstMatching):
        (RenderText::detach):
        (RenderText::deleteRuns):
        (RenderText::findTextRun):
        (RenderText::nodeAtPoint):
        (RenderText::checkSelectionPoint):
        (RenderText::cursorPos):
        (RenderText::posOfChar):
        (RenderText::paintObject):
        (RenderText::position):
        (RenderText::width):
        * khtml/rendering/render_text.h:
        * kwq/KWQRenderTreeDebug.cpp:
        (writeTextRun):
        (write):

2003-02-03  David Hyatt  <hyatt@apple.com>

	Fix for assertion on nasdaq.com.  Patch containingBlock
	to return 0 when it can't find a containingBlock at all (e.g.,
	when the object is orphaned).

	Patch setOverhangingContents to deal with a null containingBlock
	caused by it being called from RenderImage::setStyle().

	The bug # is 3162989.
	
        Reviewed by Darin.

        * khtml/rendering/render_object.cpp:
        (RenderObject::containingBlock):
        (RenderObject::setOverhangingContents):

2003-02-02  David Hyatt  <hyatt@apple.com>

	Enable support for the "run-in" and "compact" display types.

	Also implementing support for :before and :after (they were not even
	remotely working before these fixes).

	Made sure :first-letter drills into inline children to find the
	first letter in a block, e.g., so :before content can be used in
	conjunction with :first-letter.

	Fixed a regression in addOverhangingFloats that broke meyerweb.com's
	front page.

	Patched findNextLineBreak to correctly handle words that cross
	inline boundaries and white-space mixtures.  We now pass Hixie's
	insanely evil mixed white-space test (we are the only browser
	to do so).
	
        Reviewed by kocienda

        * ChangeLog:
        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/bidi.cpp:
        (RenderBlock::findNextLineBreak):
        * khtml/rendering/render_block.cpp:
        (RenderBlock::setStyle):
        (RenderBlock::addChildToFlow):
        (getInlineRun):
        (RenderBlock::layoutBlockChildren):
        (RenderBlock::paintObject):
        (RenderBlock::clearFloats):
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidthUsing):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::insertPseudoChild):
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::addChild):
        * khtml/rendering/render_image.cpp:
        (RenderImage::setStyle):
        * khtml/rendering/render_inline.cpp:
        (RenderInline::setStyle):
        (RenderInline::addChildToFlow):
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        (RenderStyle::addPseudoStyle):

2003-02-03  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3146862 -- meta http-equiv refresh with a space before the delay does not work

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
        Fix code that was trying to use positions within the whitespace-stripped string,
        but extracting substrings from the non-stripped original.

        - tweaks to render tree dumping format

        * khtml/rendering/render_block.h: Make renderName not be inline, since
        an inline virtual function doesn't really do any good.
        * khtml/rendering/render_block.cpp: (RenderBlock::renderName): Use the
        string RenderBlock instead of the string Block for consistency with all the
        other renderName results.
        
        * khtml/rendering/render_inline.h: Make renderName not be inline, since
        an inline virtual function doesn't really do any good.
        * khtml/rendering/render_inline.cpp: (RenderInline::renderName): Use the
        string RenderInline instead of the string Inline for consistency with all the
        other renderName results.
        
        * khtml/rendering/render_text.h: Make textSlaves() a const member function.
        * kwq/KWQRenderTreeDebug.cpp:
        (operator<<): Format rectangles as "x at (1,2) size 3x4" rather than "(1,2,3,4)".
        (quoteAndEscapeNonPrintables): Added. Makes it easy to turn an arbitrary Unicode
        string into something that's all ASCII.
        (writeTextSlave): Change this so it also writes out the text.
        (write): Call the new writeTextSlave, and also use "layer" instead of "RenderLayer".

2003-02-01  Darin Adler  <darin@apple.com>

        - fix mistake that broke build

        * khtml/rendering/render_block.h: Add include of <qsortedlist.h>.

2003-01-31  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - reduced the amount of RenderFlow in the world by about 1/2

        * khtml/rendering/bidi.h: Take RenderBlock * instead of RenderFlow *.
        * khtml/rendering/bidi.cpp:
        (BidiIterator::BidiIterator): Take RenderBlock * instead of RenderFlow *.
        (RenderBlock::layoutInlineChildren): Fix debug message to say RenderBlock instead of RenderFlow.
        (RenderBlock::findNextLineBreak): Fix debug message to say RenderBlock instead of RenderFlow.

        * khtml/rendering/render_block.cpp:
        (RenderBlock::addChildToFlow): Make RenderBlock * instead of RenderFlow *.
        (RenderBlock::layout): Fix debug message to say RenderBlock instead of RenderFlow.
        (RenderBlock::layoutBlockChildren): Fix debug message to say RenderBlock instead of RenderFlow.
        (RenderBlock::clearFloats): Fix debug message to say RenderBlock instead of RenderFlow.

        * khtml/rendering/render_flow.h: Return a RenderFlow * instead of a RenderObject * from createFlow.
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::createFlow): Use an if statement instead of ? : to get rid of typecasting.

        * khtml/rendering/render_html.cpp: (RenderHtml::containingBlockWidth):
        Fix parent call to call RenderBlock. Calling RenderFlow was a mistake, but one that didn't matter
        since the actual method isn't implemented until up in RenderBox anyway.

        * khtml/rendering/render_inline.h: Change some parameters to RenderBlock *.
        * khtml/rendering/render_inline.cpp:
        (cloneInline): Make this return a RenderInline * instead of a RenderFlow *.
        (RenderInline::splitInlines): Change some parameters to RenderBlock * and locals to RenderInline *.
        (RenderInline::splitFlow): Change some parameters and locals to RenderBlock *.

        * khtml/rendering/render_layer.h: Remove forward declaration of class RenderFlow.
        * khtml/rendering/render_object.h: Remove forward declaration and friend declaration of class RenderFlow.

2003-01-31  Trey Matteson  <trey@apple.com>

	New plumbing for autofill/autocomplete.  WebBrowser receives controlText delegate
	messages from our form widgets.  Should result in no behavior change.

	New SPI is exposed over the bridge and KWQTextField passes the text delegate msgs to it.

        Reviewed by Richard

        * kwq/KWQTextField.mm:  Pass text delegate msgs through new SPI.
        (-[KWQTextField controlTextDidBeginEditing:]):
        (-[KWQTextField controlTextDidEndEditing:]):
        (-[KWQTextField controlTextDidChange:]):
        (-[KWQTextField control:textShouldBeginEditing:]):
        (-[KWQTextField control:textShouldEndEditing:]):
        (-[KWQTextField control:didFailToFormatString:errorDescription:]):
        (-[KWQTextField control:didFailToValidatePartialString:errorDescription:]):
        (-[KWQTextField control:isValidObject:]):
        (-[KWQTextField control:textView:doCommandBySelector:]):
        * kwq/WebCoreBridge.h:  New SPI for passing text delegate msgs.

2003-01-31  David Hyatt  <hyatt@apple.com>

	Fix regression that broke John's site.  RenderInline needs
	to implement childrenInline() so that it can return true.
	I pulled this method out of RenderFlow and into RenderBlock,
	which caused RenderInline to use RenderObject's method (and
	that one returns false).
	
        Reviewed by rjw

        * khtml/rendering/render_inline.h:

2003-01-31  David Hyatt  <hyatt@apple.com>

	Fix for crash on espn.com.  Revert my change to make 
	containingBlock() return 0 for the root.  Put it back to the
	old behavior, where the root returns itself when you ask for
	the root's containing block.
	
        Reviewed by rjw

        * khtml/rendering/render_object.cpp:
        (RenderObject::containingBlock):
        (RenderObject::setOverhangingContents):

2003-01-31  David Hyatt  <hyatt@apple.com>

	Two whitespace handling fixes that improve <pre> handling, 
	especially of inline pres.
	
        Reviewed by rjw.

        * khtml/rendering/bidi.cpp:
        (RenderBlock::findNextLineBreak):
        
2003-01-31  Darin Adler  <darin@apple.com>

        Reviewed by Richard.

        * khtml/misc/decoder.cpp: (Decoder::decode): Turn off Japanese auto-detect.
	It was causing us to use Japanese encoding on pages that were UTF-8.

2003-01-31  Darin Adler  <darin@apple.com>

        * Resources/Info.plist: Removed unused file.

2003-01-31  David Hyatt  <hyatt@apple.com>

	Split RenderFlow into subclasses: RenderInline and RenderBlock.
	This change should make inlines a lot smaller (since nearly all
	of the member variables in RenderFlow moved into RenderBlock).

	It also simplifies methods like containingBlock(), which can
	now return a RenderBlock.
	
        Reviewed by darin

        * WebCore.pbproj/project.pbxproj:
        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/bidi.cpp:
        (RenderBlock::bidiReorderLine):
        (RenderBlock::layoutInlineChildren):
        (RenderBlock::findNextLineBreak):
        * khtml/rendering/render_block.cpp: Added.
        (:RenderFlow):
        (RenderBlock::~RenderBlock):
        (RenderBlock::setStyle):
        (RenderBlock::addChildToFlow):
        (getInlineRun):
        (RenderBlock::makeChildrenNonInline):
        (RenderBlock::removeChild):
        (RenderBlock::layout):
        (RenderBlock::layoutBlockChildren):
        (RenderBlock::layoutSpecialObjects):
        (RenderBlock::paint):
        (RenderBlock::paintObject):
        (RenderBlock::paintFloats):
        (RenderBlock::insertSpecialObject):
        (RenderBlock::removeSpecialObject):
        (RenderBlock::positionNewFloats):
        (RenderBlock::newLine):
        (RenderBlock::leftOffset):
        (RenderBlock::leftRelOffset):
        (RenderBlock::rightOffset):
        (RenderBlock::rightRelOffset):
        (RenderBlock::lineWidth):
        (RenderBlock::nearestFloatBottom):
        (RenderBlock::floatBottom):
        (RenderBlock::lowestPosition):
        (RenderBlock::rightmostPosition):
        (RenderBlock::leftBottom):
        (RenderBlock::rightBottom):
        (RenderBlock::clearFloats):
        (RenderBlock::addOverHangingFloats):
        (RenderBlock::checkClear):
        (RenderBlock::nodeAtPoint):
        (RenderBlock::calcMinMaxWidth):
        (next):
        (RenderBlock::calcInlineMinMaxWidth):
        (RenderBlock::calcBlockMinMaxWidth):
        (RenderBlock::close):
        (RenderBlock::printTree):
        (RenderBlock::dump):
        * khtml/rendering/render_block.h: Added.
        * khtml/rendering/render_body.cpp:
        (RenderBody::RenderBody):
        (RenderBody::setStyle):
        (RenderBody::layout):
        (RenderBody::availableHeight):
        * khtml/rendering/render_body.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::containingBlockWidth):
        (RenderBox::calcWidth):
        (RenderBox::calcHeight):
        * khtml/rendering/render_container.cpp:
        (RenderContainer::insertPseudoChild):
        (RenderContainer::removeLeftoverAnonymousBoxes):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::createFlow):
        (RenderFlow::addChildWithContinuation):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_form.h:
        * khtml/rendering/render_html.cpp:
        (RenderHtml::RenderHtml):
        (RenderHtml::setStyle):
        (RenderHtml::layout):
        * khtml/rendering/render_html.h:
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_inline.cpp: Added.
        (:RenderFlow):
        (RenderInline::~RenderInline):
        (RenderInline::setStyle):
        (RenderInline::addChildToFlow):
        (cloneInline):
        (RenderInline::splitInlines):
        (RenderInline::splitFlow):
        (RenderInline::paint):
        (RenderInline::paintObject):
        (RenderInline::calcMinMaxWidth):
        (RenderInline::offsetWidth):
        (RenderInline::offsetHeight):
        (RenderInline::offsetLeft):
        (RenderInline::offsetTop):
        * khtml/rendering/render_inline.h: Added.
        * khtml/rendering/render_list.cpp:
        (RenderListItem::RenderListItem):
        (RenderListItem::setStyle):
        (getParentOfFirstLineBox):
        (RenderListItem::calcMinMaxWidth):
        (RenderListItem::layout):
        (RenderListItem::paint):
        (RenderListItem::paintObject):
        * khtml/rendering/render_list.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        (RenderObject::containingBlock):
        (RenderObject::setOverhangingContents):
        (RenderObject::removeFromSpecialObjects):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.h:
        * khtml/rendering/render_root.cpp:
        (RenderRoot::RenderRoot):
        (RenderRoot::calcMinMaxWidth):
        (RenderRoot::layout):
        (RenderRoot::paintObject):
        * khtml/rendering/render_root.h:
        * khtml/rendering/render_table.cpp:
        (RenderTable::RenderTable):
        (RenderTable::setStyle):
        (RenderTable::lineHeight):
        (RenderTable::baselinePosition):
        (RenderTable::addChild):
        (RenderTable::calcWidth):
        (RenderTable::recalcSections):
        (RenderTable::dump):
        (RenderTableCell::RenderTableCell):
        (RenderTableCell::detach):
        (RenderTableCell::calcMinMaxWidth):
        (RenderTableCell::close):
        (RenderTableCell::repaintRectangle):
        (RenderTableCell::absolutePosition):
        (RenderTableCell::setStyle):
        (RenderTableCell::dump):
        * khtml/rendering/render_table.h:
        * khtml/rendering/render_text.h:
        * khtml/xml/dom_textimpl.cpp:
        (TextImpl::rendererIsNeeded):

2003-01-31  Darin Adler  <darin@apple.com>

        Reviewed by me, Dave wrote the code.

        - fixed 3162013 -- Safari collapses margins through bottom borders (affects top of zeldman.com)

        * khtml/rendering/render_flow.cpp: (RenderFlow::layoutBlockChildren):
        Don't collapse if we have any bottom border or padding.

2003-01-31  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3160442 -- no top image map at ebay, caused by referrer returning null instead of empty string

        * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet):
        Return an empty string, not null, when there is no referrer.
        
2003-01-31  Chris Blumenberg  <cblu@apple.com>

        * kwq/WebCoreBridge.mm: fixed key value

2003-01-31  Chris Blumenberg  <cblu@apple.com>

	Fixed : 3155148 - image shown when dragging gets size from image file, not size as used on page


        Reviewed by darin.

        * kwq/WebCoreBridge.h: added WebCoreElementImageRectKey
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementAtPoint:]): get the rect of the image

2003-01-30  Trey Matteson  <trey@apple.com>

	3161088 - disabled select elements are not disabled when scrolling list used	

	We use a tableview delegate method to prevent the user from changing the
	selection when disabled.  Too bad tableviews don't know how to disable themselves.
	We also condition the cell used for drawing to match our enabled state.

        Reviewed by Maciej.

        * kwq/KWQListBox.h:  Keep track of whether we are enabled.
        * kwq/KWQListBox.mm:
        (QListBox::QListBox):  Init new flag.
        (QListBox::setEnabled):  Set new flag.
        (QListBox::isEnabled):  Getter for new flag.
        (-[KWQListBoxTableViewDelegate selectionShouldChangeInTableView:]):
	Disallow selection changes if disabled.
        (-[KWQListBoxTableViewDelegate tableView:willDisplayCell:forTableColumn:row:]):
	Enable cell based on our enabled state to get visual feedback of being disabled.

2003-01-30  Trey Matteson  <trey@apple.com>

	3161486 - REGRESSION: double click on a widget causes crash

	Slight enhancement to the earlier fix of this bug.  When handling a doubleclick we
	don't want to try to pass the current event down the Cocoa widgets, because Cocoa
	has no double-click event, and we just end up resending one we already sent.

	The upshot is that we do not pass an extra mouseup event to the widgets at the
	end of a double click sequence.

        Reviewed by Darin.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
	Do not pass event down to the widget for doubleclick events.

=== Safari-55 ===

2003-01-30  Darin Adler  <darin@apple.com>

        Reviewed by Ken, Maciej, and Trey.

	- fixed 3161486 -- REGRESSION: double click on a widget causes crash

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
        Only pass the mouseUp event if it's not the same as the current event.
        Through a strange set of circumstances, sometimes the "mouse down" event is a mouse up
        event (due to KHTML vs. AppKit differences for double-click handling).

        - fixed build with newer compiler

        * khtml/html/Makefile.am: Use ANSI-C style, not C++ style, gperf.
        * khtml/html/doctypes.cpp: Regenerated.
        * khtml/html/html_documentimpl.cpp: Do __inline workaround to make newer compiler happy.
        (HTMLDocumentImpl::determineParseMode): Change to use ANSI-C style.

2003-01-30  Richard Williamson   <rjw@apple.com>

        Fix for 3156831 (and dupe 3160816).  Don't access userInfo on an invalid NSTimer.
        
        Reviewed by trey.

        * kwq/KWQObject.mm:
        (QObject::pauseTimer):
        (QObject::resumeTimers):

2003-01-30  Trey Matteson  <trey@apple.com>

	3160565 - REGRESSION: Can't log in to etrade

	Fix regression caused by fixed to 3058229.  We auto-select an item of a select element
	if it is size=1 or size is unset (m_size==0 in the code).

	This gives us conformance with WinIE.  The test at dbaron.org fails us for the
	case of a disabled list with no size and no initial selection.

        Reviewed by Darin.

        * khtml/html/html_formimpl.cpp:
        (HTMLSelectElementImpl::recalcListItems):  Auto-select an item if size==1 or is unset.

2003-01-30  David Hyatt  <hyatt@apple.com>

	Make quirk bits part of the bitfield to shrink RenderFlows.
	
        Reviewed by trey

        * khtml/rendering/render_flow.h:

2003-01-30  David Hyatt  <hyatt@apple.com>

	Fix for 3155954.  Make sure no layers get made for :before,
	:after or :first-letter.  The only debatable case is whether
	overflow can apply to generated content.  Included a FIXME
	to think about that case.
	
        Reviewed by darin

        * khtml/rendering/render_container.cpp:
        (RenderContainer::insertPseudoChild):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::addChildToFlow):
        * khtml/rendering/render_text.cpp:
        (RenderText::nodeAtPoint):

2003-01-30  Darin Adler  <darin@apple.com>

        * khtml/html/html_documentimpl.cpp: Updated license.

2003-01-29  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3158958 -- nil-dereference in KJS::DOMNode::getValueProperty at www.babyage.com

        * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty):
        Move the code that gets the render object down after the point where the render tree
        is updated, so we don't end up using a stale pointer.

2003-01-29  Darin Adler  <darin@apple.com>

        - add new assertion that Dave can use to debug bug 3155954 tomorrow

        * khtml/rendering/render_arena.cpp: (RenderArena::allocate): Assert that the arena is not 0.
        (RenderArena::free): Change signature so we will detect double-frees even more simply.

2003-01-29  David Hyatt  <hyatt@apple.com>

	Margins were being lost on documents inside iframes
	and objects.  This turned out to be 3 different bugs, one
	of which involved the bad cast of an object element to an
	iframe element.
	
        Reviewed by darin

        * khtml/html/html_baseimpl.cpp:
        (HTMLIFrameElementImpl::HTMLIFrameElementImpl):
        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::slotViewCleared):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::createPart):

2003-01-29  David Hyatt  <hyatt@apple.com>

	Fix for auto width tables.  Prevent overflow when assigning from
	the computed integer max width back into a short value.

	Fixes cnn.com and spies.com. Bug # is 3158469.
	
        Reviewed by darin

        * khtml/rendering/table_layout.cpp:
        (AutoTableLayout::calcMinMaxWidth):

2003-01-29  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3150439 -- navigating to a .xml, then away, then back causes display problems

        * khtml/rendering/render_root.h: Add paintBoxDecorations
        * khtml/rendering/render_root.cpp: (RenderRoot::paintObject):
        Call paintBoxDecorations all the time. Don't consult shouldPaintBackgroundOrBorder(),
        and don't waste cycles on !isInline().
        (RenderRoot::paintBoxDecorations): If we don't have a RenderHtml as our first child,
        then fill with the background color.

        * khtml/html/htmlparser.cpp: (KHTMLParser::finished): Remove code that makes an HTML
        element for an empty document. We don't need it any more.

2003-01-29  David Hyatt  <hyatt@apple.com>

	Fix for tables.  They weren't initializing their max top/bottom
	values for margin collapsing, so their margins were being
	ignored!
	
        Reviewed by darin

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):

2003-01-29  David Hyatt  <hyatt@apple.com>

	Back out my removal of the layer optimization.  The rest of
	the code is not prepared to deal with child elements overriding
	visibility, or with invisible layers sitting on top of
	visible ones.
	
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::constructZTree):

2003-01-28  David Hyatt  <hyatt@apple.com>

	Fix yet another bug with makeChildrenNonInline that caused the
	assertion on 3158194.  Rather than trying to work with the
	function as it was written by the KHTML guys, I've just thrown
	everything out and re-written it using a helper function to make
	it more clear what's going on (and less error-prone).
	
        Reviewed by darin

        * khtml/rendering/render_flow.cpp:
        (getInlineRun):
        (RenderFlow::makeChildrenNonInline):

2003-01-29  Darin Adler  <darin@apple.com>

        * khtml/rendering/break_lines.cpp: (isBreakable): Fix error that prevented this
        from compiling. I had failed to build, and then tested the version without my change!
        I retested with the change.

2003-01-29  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3158477 -- text break locator leak leads to giant (2.04 GB) VSIZE idling at livepage

        * khtml/rendering/break_lines.cpp: (isBreakable): Dispose the text locator.

2003-01-28  David Hyatt  <hyatt@apple.com>

	Fix quirks/strict regression caused by improper use of findRev (should
	be find), and latin1() (can't be invoked on temporaries).
	
        Reviewed by darin

        * khtml/html/html_documentimpl.cpp:
        (parseDocTypePart):
        (HTMLDocumentImpl::determineParseMode):

2003-01-28  David Hyatt  <hyatt@apple.com>

	Fix for 3155209, dashed-line schmutz left behind when dragging
	links.  

	Also porting a fix from the old table code to the new table code
	that I missed.
	
        Reviewed by darin

        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):

2003-01-27  David Hyatt  <hyatt@apple.com>

	New implementation of determineParseMode that is much better
	about getting the quirks vs. strict decision right (as compared
	to Mozilla and WinIE).

	Also made a new inQuirksMode function and converted callers of
	parseMode to use it, so that AlmostStrict and Strict modes will
	both be treated as non-quirks mode by those who check for this
	sort of thing.
	
        Reviewed by darin, mjs

        * khtml/html/html_documentimpl.cpp:
        (parsePS):
        (containsString):
        (parseDocTypeDeclaration):
        (HTMLDocumentImpl::determineParseMode):
        * khtml/html/html_headimpl.cpp:
        (HTMLLinkElementImpl::setStyleSheet):
        (HTMLStyleElementImpl::childrenChanged):
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::attach):
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::parseToken):
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::parseTag):
        * khtml/khtml_part.cpp:
        (KHTMLPart::gotoAnchor):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layoutBlockChildren):
        * khtml/rendering/render_list.cpp:
        (getParentOfFirstLineBox):
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::determineParseMode):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::createDecl):
        * kwq/KWQString.mm:
        (QString::compare):

2003-01-28  Darin Adler  <darin@apple.com>

        Reviewed by Ken and Maciej.

        - fixed remaining bit of 3142646 -- JavaScript Error reported at www.hotmail.com after first time

        The problem was that forms that were attached, but had no render object yet, were
        not in the form names dictionary. This causes trouble for JavaScript that runs before
        style sheets load, since the FOUC code makes us not create render objects at that stage.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::attach): Don't check m_render before adding to dictionary.
        (HTMLFormElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
        to track the name of the form in the dictionary.

        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
        to track the name of the image in the dictionary.
        (HTMLImageElementImpl::attach): Don't check m_render before adding to dictionary.

2003-01-28  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3157014 - Crash on disabling JavaScript and reloading livepage.apple.com
	
        * khtml/khtml_part.cpp:
        (KHTMLPart::openURL): Move check of JavaScript setting and possible disabling from here...
        (KHTMLPart::begin): ... to here, to make sure it happens after clearing the interpreter.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::resumeActions): Don't bother to restore timers if JavaScript is off.

2003-01-28  Trey Matteson  <trey@apple.com>

	3158465 - REGRESSION: cursor turns into I-beam after clicking on most KWQ widgets

	When we return from handing a mousedown to an AK widget, we check to see if currentEvent
	is now a MouseUp, in which case we hand it to khtml.  This allows khtml to keep in
	synch as to the state of the mouse.  This covers the case of AK widgets that
	run their own event loop and consume events until a mouseup (but not ones that use
	Carbon, such as PopUpList, since Carbon does not update currentEvent).

        Reviewed by Darin.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget):  Pass mouseup to khtml.

2003-01-28  Trey Matteson  <trey@apple.com>

	2940179 - Arrow cursor should change to link cursor after click of link in non-frontmost window

	3158238 - cursor shape does not track after double-click to activate a window

        Reviewed by Darin.

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMouseDoubleClickEvent):  We get this when the mouse
	goes up the second time, so clear d->mousePressed.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::mouseMoved):  Pitch any mousemoved that comes through while
	we think the mouse is down.  Those screw up our tracking, like 3137661.  This is
	part of the 2940179 fix.

2003-01-27  Trey Matteson  <trey@apple.com>

	3157146 REGRESSION: using a pop-up menu turns the cursor into an I-beam

 	A hack for the benefit of AK's PopUpButton, which uses the Carbon menu
	manager, which thus eats all subsequent events after it is starts its
	modal tracking loop.  After the interaction is done, we call a new routine
	to fix things up in the khtml event world.  We post a fake mouse up to balance
	the mouse down we started with.  In addition, we post a fake mouseMoved to get
	the cursor in sync with whatever we happen to be over after the tracking is done.

        Reviewed by Darin.

        * kwq/KWQComboBox.mm:
        (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
	Call part after NSPopUp's modal tracking consumes events.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::doFakeMouseUpAfterWidgetTracking):  New routine to allow widgets
	to get out event state fixed up after a modal tracking loop.

2003-01-27  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3152053 - Safari: Java 141: Only visible applets are instantiated on web page

        Reviewed by dave.

        * khtml/rendering/render_applet.cpp:
        (RenderApplet::layout): move the widget before calling showApplet
        * kwq/KWQKJavaAppletWidget.mm:
        (KJavaAppletWidget::showApplet): add the java view to the main view immediately instead of waiting for first paint
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge selectionImage]): tweak

2003-01-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3156461 - SECURITY: contentDocument of iframe from other domain can be accessed
	- fixed 3156462 - SECURITY: can invoke setTimeout on other window
	- fixed 3156469 - SECURITY: can add an event listener on another protected window
	- fixed 3156527 - SECURITY: Can access HTML document from different domain in another frame
	- fixed 3156535 - SECURITY: Can access XML document from different domain in another frame

	These fixes are merged from or inspired by security fixes in upstream khtml.
	
        * khtml/ecma/kjs_dom.h:
        * khtml/ecma/kjs_dom.cpp:
        (KJS::checkNodeSecurity): Prototype new method used to check whether a document
	is allowed to access the contents of a node.
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::getValueProperty): Apply security check to
	getting the contentDocument of an iframe or object.
        * khtml/ecma/kjs_window.cpp:
	(Window::get): Make sure addEventListener/removeEventListener, and
	all timer related functions are protocted from cross-domain calls.
        (WindowFunc::tryCall): Make sure this is true even if they are
	detached from one window and called on another.
        * khtml/khtml_part.cpp:
        (KHTMLPart::checkEmitLoadEvent): When setting frames to the domain
	of the parent document, don't force it, so the usual suffix check
	rule will apply.

2003-01-27  Richard Williamson   <rjw@apple.com>

        Reviewed by trey.

        Added ASSERT trap to help track down non-repro crash reported
        by 3144546.
        
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURLFromPageCache):
        
        Remove assert that caused 3155781.  We believe this was happening
        because of a delayed release of the page cache after emptying cache
        from "Empty Cache" menu item.
        
        * kwq/KWQPageState.mm:
        (-[KWQPageState dealloc]):

2003-01-27  David Hyatt  <hyatt@apple.com>

	Fix text dragging so that text inside floats paints when you
	drag the selection.
	
        Reviewed by cblu

        * ChangeLog:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintObject):
        (RenderFlow::paintFloats):
        * khtml/rendering/render_flow.h:

2003-01-26  David Hyatt  <hyatt@apple.com>

	Fix the default font size settings for monospace fonts to
	really work.  It was overaggressive and kicking in when it
	shouldn't have, resulting in failures on the CSS1 test suite.
	
        Reviewed by darin, john

        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/font.h:

2003-01-26  Chris Blumenberg  <cblu@apple.com>
	
	Fixed: 3156725 - Partially selected links show extra underlining when dragged
	Fixed: 3156962 - Text drag image sometimes doesn't include last selected text node

        Reviewed by darin.

        * khtml/rendering/render_root.cpp:
        (RenderRoot::selectionRect): include all nodes that are selected
        * khtml/rendering/render_text.cpp:
        (TextSlave::paintDecoration): removed stray ";"
        (RenderText::paintObject): call paintDecoration with default parameters for "from" and "to" when not painting the selection only
        * khtml/rendering/render_text.h:

2003-01-26  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3126431 -- failed assertion `!attached()' at silkair.net

        * khtml/rendering/render_image.h: Fix isImage which for some strange reason was
        returning false. Not important because no one calls it. Added dispatchLoadEvent
        and detach member functions.
        * khtml/rendering/render_image.cpp:
        (RenderImage::notifyFinished): Instead of dispatching the load or error event
        immediately, call dispatchImageLoadEventSoon on the document.
        (RenderImage::dispatchLoadEvent): Added. Moved the code to do the actual
	event dispatch in here.
        (RenderImage::detach): Remove the image from the document in case it has a
        pending event that was not delivered yet before calling the base class detach.

        * khtml/xml/dom_docimpl.h: Add dispatchImageLoadEventSoon, dispatchImageLoadEventsNow,
        removeImage, and an override of timerEvent. Moved APPLE_CHANGES code to a better place.
        * khtml/xml/dom_docimpl.cpp: Moved APPLE_CHANGES code to a better place and made these changes:
        (DocumentImpl::DocumentImpl): Initialize m_imageLoadEventTimer to 0.
        (DocumentImpl::detach): Redo the APPLE_CHANGES to make them easier to read.
        Empty out the m_imageLoadEventDispatchSoonList and the m_imageLoadEventDispatchingList
        to avoid an O(n^2) operation as we detach each image and remove it from the list.
        (DocumentImpl::dispatchImageLoadEventSoon): Added. Adds image to list and sets up timer.
        (DocumentImpl::removeImage): Added. Removes image from lists, and cancels timer if needed.
        (DocumentImpl::dispatchImageLoadEventsNow): Added. Copies list, and call images to dispatch load events.
        (DocumentImpl::timerEvent): Added. Calls dispatchImageLoadEventsNow.

        * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
        Dispatch all pending image load events before dispatching the document load.

        * force-clean-timestamp: Force rebuild because Project Builder doesn't do
	header dependencies well enough to deal with changes to the document class.

2003-01-26  David Hyatt  <hyatt@apple.com>

	Fix :active to behave just like :hover.  It was being
	restricted and only allowed to match <a> tags, when :active
	should be applicable to any element (e.g., like images).

	Fixes the :active feedback on numerous blog sites (e.g.,
	the photo image buttons on joehewitt.com).
	
        Reviewed by gramps

        * khtml/css/cssstyleselector.cpp:

2003-01-25  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3126211 -- "go back" buttons that use "history.go(-1)" doesn't work (verizonwireless.com is an example)
	- fixed 2950618 -- JavaScript window.history object name prints blank

        * khtml/ecma/kjs_window.cpp:
        (FrameArray::toString): Added. Returns "[object FrameArray]".
        (History::getValueProperty): Removed #if APPLE_CHANGES to turn more code on.
        (History::toString): Added. Returns "[object History]".

        * kwq/KWQKPartsBrowserExtension.h: Make browserInterface a pure virtual function
	instead of always returning 0.
        * kwq/KWQKHTMLPartBrowserExtension.h: Added browserInterface() function.
	Also replaced m_part with a _part that is a KWQKHTMLPart to simplify code.
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::KHTMLPartBrowserExtension): Create the browser
	interface object when the browser extension object is created.
        (KHTMLPartBrowserExtension::openURLRequest): Use _part instead of KWQ(m_part).
        (KHTMLPartBrowserExtension::createNewWindow): Use _part instead of KWQ(m_part).
        (KHTMLPartBrowserExtension::setIconURL): Use _part instead of KWQ(m_part).
        (KHTMLPartBrowserExtension::setTypedIconURL): Use _part instead of KWQ(m_part).

        * kwq/KWQKPartsBrowserInterface.h: Add a constructor, property() function, and
	_part data member.
        * kwq/KWQKPartsBrowserInterface.mm:
	(BrowserInterface::property): Added. Handles historyLength property by calling
	the historyLength method on the bridge.
	(BrowserInterface::callMethod): Handles goHistory(int) by calling the
	goBackOrForward: method on the bridge.

        * kwq/WebCoreBridge.h: Added historyLength and goBackOrForward: methods.

        * kwq/KWQVariant.h: Added Int to the variant enum, added int and uint contructors,
	and added toInt() member function.
        * kwq/KWQVariant.mm:
        (QVariant::QVariant): Implemented int and uint constructors.
        (QVariant::toBool): Added Int case, sorted alphabetically.
        (QVariant::toInt): Added.
        (QVariant::toUInt): Added Int case, sorted alphabetically.
        (QVariant::asString): Added Int case, sorted alphabetically.

2003-01-25  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3153605 - Drag image when dragging text should be the actual text

        Reviewed by darin.

        * khtml/rendering/font.cpp:
        (Font::drawLineForText): take a "from" and "to" so only selected portions of text draw lines
        * khtml/rendering/font.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint): handle the selection-only case
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_root.cpp:
        (RenderRoot::selectionRect): new, computes bounding box of the selection
        * khtml/rendering/render_root.h:
        * khtml/rendering/render_text.cpp:
        (TextSlave::paintDecoration): take a "from" and "to" so only selected portions of text draw lines
        (RenderText::paintObject): when only drawing the selection, only draw selected text and no selection background
        (RenderText::paint): handle the selection-only case
        * khtml/rendering/render_text.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::paint): handle the selection-only case
        (KWQKHTMLPart::selectionRect): new, returns the bounding box of the selection
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::drawLineForText): take a "from" and "to" so only selected portions of text draw lines
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge drawRect:withPainter:]): handle the selection-only case
        (-[WebCoreBridge selectionRect]): new, returns the bounding box of the selection clipped to visible 
        (-[WebCoreBridge selectionImage]): new, returns the image of the selection

2003-01-24  David Hyatt  <hyatt@apple.com>

	Fix for 3153260, tables used as height spacers don't get the
	specified height.
	
        Reviewed by rjw

        * khtml/rendering/render_table.cpp:
        (RenderTableSection::layoutRows):

2003-01-24  Trey Matteson  <trey@apple.com>

	Chris pointed out a FIXME that led to a more contained way to make sure the cursor
	is correct during and after image/text/URL dragging.

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.h: Back out just-added resetCursor method.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::khtmlMouseMoveEvent):  Reset cursor to arrow when image drag starts.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:  Back out just-added resetCursor method, which is no
	longer needed by WebKit.

2003-01-24  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3058229 -- two failures in DOM test page for HTMLSelectElement
        - fixed 3138938 -- choose another member name on .Mac signup not working as expected
        - fixed 3155763 -- Safari autoselects first item in a WOBrowser/<select>

        * khtml/html/html_formimpl.cpp:
        (HTMLSelectElementImpl::value): Return "" rather than null when nothing is selected.
        (HTMLSelectElementImpl::recalcListItems): Don't automatically select a first item
	in the single selection case.

2003-01-24  David Hyatt  <hyatt@apple.com>

	Fix for 3146066, messed up lists on dictionary.com.  Make
	sure that a marker in an anonymous box with no other line box
	parent available just stays where it is, rather than removing
	itself from the anonymous box (causing that box to be deleted
	and recreated ad infinitum).
	
        Reviewed by darin

        * khtml/rendering/render_list.cpp:
        (RenderListItem::updateMarkerLocation):

2003-01-24  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3142852 -- frame content repeatedly requested

	The bug was that JavaScript document.referrer was totally wrong.

        * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::referrer):
	Use the new incomingReferrer() rather than referrer(), because referrer()
	is the referrer to use for new loads in the part, not the one that was
	used to load the document.

        * kwq/KWQKHTMLPart.h: Added incomingReferrer(). Also removed referrer()
	which has been totally redundant since we made KWQKHTMLPart a subclass of KHTMLPart.
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::incomingReferrer): Added. Uses the bridge.

        * kwq/WebCoreBridge.h: Added incomingReferrer.

2003-01-24  Trey Matteson  <trey@apple.com>

	3155162 - cursor changes to I-beam after dragging image	
	3154468 - no mouseup event comes through after text snippet drag

	Export a means to reset the cursor to WebKit, which is used to fix these bugs.

        Reviewed by Darin.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::resetCursor):  New method that just calls through to khtmlview's
	private resetCursor method.
        * kwq/WebCoreBridge.h:  Add new method.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge resetCursor]):  Call view's reset cursor.

2003-01-23  Trey Matteson  <trey@apple.com>

	I ran our KURL tests and found that my previous fix for "localhost" urls, fixed too much.
	This now passes all the tests.

        Reviewed by Darin.

        * kwq/KWQKURL.mm:
        (KURL::parse):  Use different logic for deciding to add //authority to the URL
	and stripping localhost off of file URLs.

2003-01-24  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed null view and hang part of 3153612 -- REGRESSION: null view and hang loading cycleworld.com

        * khtml/xml/xml_tokenizer.cpp: (XMLHandler::XMLHandler): Initialize the line number
        to 0 so we can detect the case where we didn't get a fatal error callback.
        (XMLTokenizer::finish): Construct an error page without an XML excerpt if the line
        number if 0.

2003-01-24  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3140945 -- crash viewing www.nextthing.org

        * khtml/rendering/render_container.cpp: (RenderContainer::removeLeftoverAnonymousBoxes):
	Change this function so it will never remove a table cell. Although a table cell that is
	created automatically is anonymous, it is not an anonymous box in the sense that this
	function is trying to deal with. Maybe there will be a better way to fix this some day,
	but this is the best Dave and I could come up with.

	- fixed 3155700 -- nil-dereference in khtml::RenderTableRow::detach shortly after visiting www.alltheweb.com

        * khtml/rendering/render_table.cpp: (RenderTableRow::detach):
	Check for nil before calling setNeedCellRecalc in case we are being detached after our
	parent is already nil.

2003-01-23  Richard Williamson   <rjw@apple.com>

        Fix for 3152494.  Set the default iframe width to 300 and
        height to 150.  This copies the behavior of mozilla and IE.
        
        Reviewed by hyatt.

        * khtml/css/html4.css:

2003-01-23  Richard Williamson   <rjw@apple.com>

        Fixed whitespace exclusion code.  Fixes many sites
        that have problems that were exposed after
        fixing 3119777.
        
        Reviewed by hyatt.

        * khtml/rendering/bidi.cpp:
        (RenderFlow::bidiReorderLine):
        (RenderFlow::findNextLineBreak):
        * khtml/rendering/break_lines.cpp:
        * khtml/rendering/render_text.cpp:
        (RenderText::calcMinMaxWidth):

2003-01-23  David Hyatt  <hyatt@apple.com>

	Dump textslaves in the regression tests.
	
        Reviewed by rjw.

        * kwq/KWQRenderTreeDebug.cpp:
        (operator<<):
        (write):

2003-01-23  David Hyatt  <hyatt@apple.com>

	Fix for 3144763, inlines clear too many floats, and jump all the
	way to the end of the lowest float instead of only moving as far
	down as they have to in order to fit.
	
        Reviewed by darin

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::nearestFloatBottom):
        * khtml/rendering/render_flow.h:

2003-01-23  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3144560 -- non-reproducible nil-dereference in HTMLFrameElementImpl::updateForNewURL at macfixit

        * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::updateForNewURL): Add check for nil view.

2003-01-23  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3154647 -- Triple clicked on a line of text (to select entire line), crashola

        * khtml/khtml_part.cpp:
        (firstSlaveAt): Loop instead of using recursion for siblings.
        (lastSlaveAt): Ditto, only backwards.

2003-01-23  David Hyatt  <hyatt@apple.com>

	Fix for 3142124.  

	When pseudo-elements have display:none, they should not generate
	rendering objects.
	
        Reviewed by rjw, kocienda.

        * khtml/rendering/render_container.cpp:
        (RenderContainer::insertPseudoChild):

2003-01-23  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3129556 -- can't search on japanese string at yahoo.co.jp

	The key to fixing this was to look up character sets in a way that does not
	pay attention to punctuation. Only alphanumeric characters count. Also did
	a little belt tightening and speeding up while I was at it.

        * kwq/KWQCharsets.h: Use const char * instead of CFStringRef.
        * kwq/KWQCharsets.mm:
        (buildDictionaries): Store const char * in the dictionaries instead of CFStringRef,
	and use the key compare and hash functions that obey only alphanumeric characters.
        (KWQCFStringEncodingFromIANACharsetName): Use const char * directly.
        (KWQCFStringEncodingFromMIB): Tweak code a bit.
        (KWQCFStringEncodingToIANACharsetName): Use const char * directly.
        (KWQCFStringEncodingToMIB): Tweak code a bit.
        (encodingNamesEqual): Added. Compares two names, ignoring non-alphanumeric characters.
        (encodingNameHash): Added.

        * kwq/KWQKCharsets.h: Take a const char * instead of a QString. Also overload for QCString.
	This fixes conversion back and forth from QString that was happening before.
        * kwq/KWQKCharsets.mm: (KCharsets::codecForName): Update for above parameter change.

        * kwq/KWQTextCodec.mm:
        (codecForCFStringEncoding): Add check for kCFStringEncodingInvalidId.
        (QTextCodec::codecForMib): Simplify because of above check.
        (QTextCodec::codecForName): Simplify because we don't need to make a CFStringRef, and
	because of above check.
        (QTextCodec::name): No need to convert the CFStringRef back to a const char * now.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge textEncoding]): Convert character set name to a const char * to pass in.
        (+[WebCoreBridge stringWithData:textEncodingName:]): Ditto.
        * kwq/WebCoreEncodings.mm:
        (+[WebCoreEncodings charsetNameForEncoding:]): Convert character set name to an NSString
	to use as a return value.
        (+[WebCoreEncodings encodingForCharsetName:]): Convert character set name to a const char *
	to pass in.

2003-01-23  Chris Blumenberg  <cblu@apple.com>
	
	Fixed a divide by zero problem.

        Reviewed by darin.

        * WebCore.pbproj/project.pbxproj:
        * khtml/rendering/render_image.cpp:
        (RenderImage::calcReplacedWidth):
        (RenderImage::calcReplacedHeight):

2003-01-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed last minute screwup in my last patch fixing onchange
	
        * kwq/KWQTextField.mm:
	(-[KWQTextField fieldEditorWillBecomeFirstResponder]): Renamed
	from fieldWillBecomeFirstResponder.
        (-[KWQTextField fieldEditorWillResignFirstResponder]): Renamed
	from fieldWillResignFirstResponder.

2003-01-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3151442 - mac.com homepage editing - selection and clicking with mouse don't work
	
        * khtml/ecma/kjs_events.cpp:
        (JSEventListener::handleEvent): Only allow a false return value to
	prevent default if this is an html event handler, rather than one
	set with addEventListener or the like.

2003-01-23  Chris Blumenberg  <cblu@apple.com>

	Replaced the paint phase constants with the PaintAction enum. Added PaintActionSelection as a paint action. This will eventually allow us to only paint selected objects. This is needed for the text dragging image.

        Reviewed by dave.

        * khtml/rendering/render_box.cpp:
        (RenderBox::paint):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paint):
        (RenderFlow::paintObject):
        (RenderFlow::paintFloats):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_html.cpp:
        (RenderHtml::paint):
        * khtml/rendering/render_html.h:
        * khtml/rendering/render_image.cpp:
        (RenderImage::paintObject):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):
        * khtml/rendering/render_list.cpp:
        (RenderListItem::paint):
        (RenderListItem::paintObject):
        (RenderListMarker::paint):
        (RenderListMarker::paintObject):
        * khtml/rendering/render_list.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::paint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::paint):
        (RenderWidget::paintObject):
        * khtml/rendering/render_replaced.h:
        * khtml/rendering/render_root.cpp:
        (RenderRoot::paint):
        (RenderRoot::paintObject):
        * khtml/rendering/render_root.h:
        * khtml/rendering/render_table.cpp:
        (RenderTable::paint):
        (RenderTableSection::paint):
        (RenderTableCell::paint):
        * khtml/rendering/render_table.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::paintObject):
        (RenderText::paint):
        * khtml/rendering/render_text.h:

2003-01-23  David Hyatt  <hyatt@apple.com>

	Fix for 3147995, empty <li> tags don't render bullets.
	
        Reviewed by john.

        * khtml/rendering/render_list.cpp:
        (RenderListItem::layout):
        * khtml/rendering/render_list.h:

2003-01-23  David Hyatt  <hyatt@apple.com>

	Fix for 3134613, bullets overlapping text on weather.com.  Make
	sure min/max widths get updated when the marker moves around.
	
        Reviewed by john

        * khtml/rendering/render_list.cpp:
        (RenderListItem::updateMarkerLocation):
        (RenderListItem::calcMinMaxWidth):
        (RenderListItem::layout):
        * khtml/rendering/render_list.h:

=== Safari-54 ===

2003-01-23  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3154575 -- REGRESSION: Right sidebar on Yahoo! page in base PLT renders incorrectly

        * khtml/rendering/break_lines.cpp: (isBreakable): Pass kUCTextBreakLineMask to the
	UC calls, which looks for places where line breaks are allowed, instead of kUCTextBreakWordMask,
	which finds all word breaks instead. We still pass all the layout tests, so I think this means
	Japanese word breaking is still OK.

	- fixed 3154416 -- images that specify width but not height should keep aspect ratio (example at thegods.org.uk)

        * khtml/rendering/render_image.h: Declared new member functions.
        * khtml/rendering/render_image.cpp:
        (RenderImage::widthSpecified): Added helper function.
        (RenderImage::heightSpecified): Added helper function.
        (RenderImage::calcReplacedWidth): Added. Derives width from height keeping aspect ratio if we
	have a specified height and no width.
        (RenderImage::calcReplacedHeight): Added. Same thing in the opposite direction.

2003-01-22  Trey Matteson  <trey@apple.com>

	3153313 cursor changes during text selection when we cross links

        Reviewed by Dave.

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMousePressEvent):  Remember mouse is down.
        (KHTMLView::viewportMouseMoveEvent):  Use ibeam while mouse down.
        (KHTMLView::viewportMouseReleaseEvent):  Remember that it's up.

2003-01-22  David Hyatt  <hyatt@apple.com>

	Fix first-line regression caused by my removal of a local variable.
	
        Reviewed by mjs

        * khtml/css/cssstyleselector.cpp:

2003-01-22  Richard Williamson   <rjw@apple.com>

        Fix the fix to 3119777 to scan for break over entire string
        instead of trying to optimize.
        
        Reviewed by hyatt.

        * khtml/rendering/break_lines.cpp:
        Pass offset into entire string, rather than try to optimize
        by passing a shorter string.

2003-01-22  David Hyatt  <hyatt@apple.com>

	Fix the CSS parser so that it disallows class names beginning
	with a digit even in quirks mode.
	
        Reviewed by rjw

        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseSelector2):

2003-01-22  Richard Williamson   <rjw@apple.com>

        Fix 3119777 (and a host of other international bugs).  Word break
        was broken.  Use unicode services to detect work breaks
        for non basic latin1.  We may want to go further and
        always use unicode services so we get correct hyphenation
        breaking.
        
        Reviewed by hyatt.

        * khtml/rendering/break_lines.cpp:

2003-01-22  David Hyatt  <hyatt@apple.com>

	Fix word-spacing bugs in text measurement calculations.  This
	fixes our issues on the CSS1 test suite.  Regression tests have
	been added for both positive and negative word-spacing.
	
        Reviewed by rjw

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):
        * khtml/rendering/render_text.cpp:
        (RenderText::calcMinMaxWidth):
        (RenderText::containsOnlyWhitespace):
        * khtml/rendering/render_text.h:

2003-01-22  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3153969 - Should not be able drag text while double or triple-click selecting it
	Fixed: 3154153 - Can drag an empty selection

        Reviewed by rjw.

        * khtml/khtml_part.cpp:
        (KHTMLPart::isPointInsideSelection): consider an empty selection like no selection
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::khtmlMouseMoveEvent): don't allow dragging after selection has started using double or triple click

2003-01-22  David Hyatt  <hyatt@apple.com>

	Fix absolute positioning problem for bottom-positioned elements.  
	This is a fix from the KHTML trunk.
	
        Reviewed by john

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcAbsoluteVertical):

2003-01-22  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3141566 -- non-reproducible nil-dereference in HTMLGenericFormElementImpl at firstdirect.com

        * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::defaultEventHandler):
	Check for the case where the view is 0.

2003-01-22  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed two-day-old regression where we get nil-dereferences with text areas

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _createTextView]): Don't do the setWidget: here because widget is always nil at this point.
        (-[KWQTextArea initWithQTextEdit:]): Do it here instead.

2003-01-22  David Hyatt  <hyatt@apple.com>

	Fix for 3126927, don't let absolute positioned blocks grow
	to accommodate content.  They overflow instead.
	
        Reviewed by mjs

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcAbsoluteVertical):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_object.h:

2003-01-22  David Hyatt  <hyatt@apple.com>

	Fix for 3153316, selection busted on google.com.  For now keep
	mouse events grabbing the absolutePosition of elements, and don't
	ever let them grab the absolutePosition of text nodes.
	
        Reviewed by john.

        * khtml/khtml_events.cpp:
        (khtml::MouseEvent::MouseEvent):
        
2003-01-22  Chris Blumenberg  <cblu@apple.com>

	Renamed isPointSelected to isPointInsideSelection because it's a better name.

        Reviewed by darin.

        * khtml/khtml_part.cpp:
        (KHTMLPart::isPointInsideSelection): 
        (KHTMLPart::khtmlMousePressEvent):
        * khtml/khtml_part.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementAtPoint:]):

2003-01-21  Chris Blumenberg  <cblu@apple.com>

	Added support for text dragging.

        Reviewed by dave.

        * khtml/khtml_events.cpp:
        (khtml::MouseEvent::offset): made checkSelectionPoint take x,y coords, passing the whole event is unnecessary
        * khtml/khtml_part.cpp:
        (KHTMLPart::isPointSelected): new
        (KHTMLPart::khtmlMousePressEvent): don't restart the selection when click was on the selection
        (KHTMLPart::khtmlMouseMoveEvent): restart the selection since we may not do it in khtmlMousePressEvent
        (KHTMLPart::khtmlMouseReleaseEvent): clear the selection if no selection took place
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::checkSelectionPoint): made checkSelectionPoint take x,y coords, passing the whole event is unnecessary
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::checkSelectionPoint): made checkSelectionPoint take x,y coords, passing the whole event is unnecessary
        * khtml/rendering/render_text.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::khtmlMousePressEvent): set booleans indicating that it is OK to drag or select
        (KWQKHTMLPart::khtmlMouseMoveEvent): ask WebKit if we can drag. Make this decision here instead of in khtmlMousePressEvent because WebKit needs the drag hysteresis to make the decision. 
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementAtPoint:]): set the selection bit

2003-01-21  Trey Matteson  <trey@apple.com>

	3032718 - I-beam cursor behavior different between web view and text view

	Now that the innerNode is the real text element instead of an enclosing
	tag element, it's a piece of cake to test for a text node and set the ibeam cursor.

        Reviewed by Chris

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMouseMoveEvent):  Set iBeam if over text.
        * kwq/KWQKCursor.mm:
        (KCursor::ibeamCursor):  Make this cursor have the Cocoa ibeam instead of arrow.

2003-01-21  David Hyatt  <hyatt@apple.com>

	Fix selection so that it will go up to the parent node
	if the innerNode is text, preserving the old behavior for
	now until we can rewrite selection to not require this.
	
        Reviewed by cblu.

        * khtml/khtml_events.cpp:
        (khtml::MouseEvent::offset):
        * khtml/khtml_part.cpp:
        (KHTMLPart::khtmlMousePressEvent):
        (KHTMLPart::khtmlMouseMoveEvent):

2003-01-21  Trey Matteson  <trey@apple.com>

	3121681 - "localhost" part of link is lost with relative links

	Was broken for abs links with localhost too.  Solution is to tighten up the test
	for "localhost" removal to only apply to file urls.
	canonical result.

        Reviewed by Maciej.

        * kwq/KWQKURL.mm:
        (KURL::parse):  Allow the authority processing even for links with
	localhost.  Only cut out the addition of host for locahost file links.

2003-01-21  David Hyatt  <hyatt@apple.com>

	Fix nodeAtPoint to return text nodes if the mouse is over them.
	Make :active fully hierarchical so that e.g., <a><b>Foo</b></a>
	gets an outline when clicked.
	
        Reviewed by trey

        * khtml/rendering/render_object.cpp:
        (RenderObject::setHoverAndActive):
        * khtml/rendering/render_text.cpp:
        (RenderText::nodeAtPoint):

2003-01-21  David Hyatt  <hyatt@apple.com>

	Fix for regressions on layout-tests caused by new table code.
	Make sure cell's padding is used and not just the table's cellpadding.

	Also make sure cell padding can be changed dynamically.
	
        Reviewed by darin.

        * khtml/rendering/table_layout.cpp:
        (AutoTableLayout::recalcColumn):

2003-01-21  Darin Adler  <darin@apple.com>

        - correct our copyrights to 2003; copyright is based on year of publication, not year worked on

2003-01-21  David Hyatt  <hyatt@apple.com>

	Fix for the 2.5% perf regression from the descendant rules
	changes.  This patch does 3 things:
	(1) Fix the descendant rule check in the CSS parser. It
	was incorrect.
	(2) Fix DOM insertion/removal from setting the parent as needing
	a style re-resolve.
	(3) Fix whitespace inside <html> so that it doesn't make a premature
	<body>.
	
        Reviewed by mjs

        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseSelector):
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::recalcStyle):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::insertBefore):
        (NodeBaseImpl::replaceChild):
        (NodeBaseImpl::removeChild):
        (NodeBaseImpl::appendChild):

2003-01-21  Darin Adler  <darin@apple.com>

        Reviewed by Richard.

	- clean room rewrite of QCString

        * kwq/KWQCString.mm: Replaced functions that needed rewrite.

2003-01-21  Richard Williamson   <rjw@apple.com>

        Added support to pause and resume javascript timers.  This allows pages 
        that have javascript timers to be added to the page cache.
        
        Fixes 3126138.
        
        Reviewed by trey and maciej.

        * khtml/ecma/kjs_window.cpp:
        (Window::pauseTimeouts):
        (Window::resumeTimeouts):
        (WindowQObject::pauseTimeouts):
        (WindowQObject::resumeTimeouts):
        (WindowQObject::timerEvent):
        * khtml/ecma/kjs_window.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::pauseActions):
        (KWQKHTMLPart::resumeActions):
        (KWQKHTMLPart::canCachePage):
        (KWQKHTMLPart::openURLFromPageCache):
        * kwq/KWQObject.h:
        * kwq/KWQObject.mm:
        (QObject::pauseTimer):
        (QObject::_addTimer):
        (QObject::clearPausedTimers):
        (QObject::resumeTimers):
        (QObject::startTimer):
        * kwq/KWQPageState.h:
        * kwq/KWQPageState.mm:
        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]):
        (-[KWQPageState setPausedActions:int::]):
        (-[KWQPageState int::]):
        (-[KWQPageState _cleanupPausedActions]):
        (-[KWQPageState invalidate]):
        (-[KWQPageState dealloc]):
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):
        (-[WebCoreBridge saveDocumentToPageCache]):

2003-01-21  Darin Adler  <darin@apple.com>

        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::createRenderer):
	Add return statements to fix compile on deployment build.

2003-01-21  Darin Adler  <darin@apple.com>

        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::rendererIsNeeded):
	(HTMLInputElementImpl::attach):
	Add return statements to fix compile on deployment build.

2003-01-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Nobody, fixing an accidental commit.

        * khtml/khtml_part.cpp:
	* khtml/html/html_documentimpl.cpp:
        * khtml/xml/dom_docimpl.h:

2003-01-21  Darin Adler  <darin@apple.com>

        Everything else reviewed by Maciej, dtd.cpp and htmlparser.cpp changes reviewed by Dave.

	- fixed 3151098 -- REGRESSION: Frequent assert about renderer in DOM code

        * khtml/html/dtd.cpp: (DOM::checkChild): Disallow text inside colgroup so it can be handled as a special case
	inside the parser.
        * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): Discard text inside colgroup and don't pop the colgroup.

	- fixed 3149792 -- memory trasher at robinlionheart.com
	- fixed 3150664 -- failed assertion in HTMLFrameSetElementImpl::attach on page with frameset inside frameset

	The key to fixing the 3149792 memory trasher was to avoid constructing trees where there
	is a render object nested inside an object that is not a suitable container. In particular,
	the code assumed that RenderFlow objects would only be inside other RenderFlow objects, and
	this does not happen if you have an <object> that is an image, with objects inside it that
	are intended to be used if the image fails to load.

	The key to fixing the 3150664 assertion was to handle the case where a frame set's parent
	didn't have a renderer, rather than just asserting about it.

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout): Added an assertion and a FIXME from Dave's and my review of this code.
        (RenderFlow::splitInlines): Add assertions that we have actual RenderFlow objects. Casting
	non-RenderFlow objects was the cause of the memory trashing. The other parts of this change
	assure we never hit these assertions by not creating any render objects for DOM objects
	that are inside non-RenderFlow.
        (RenderFlow::addChildWithContinuation): Add a similar assertion here.

        * khtml/rendering/render_object.h: Declare new member function.
        * khtml/rendering/render_object.cpp: (RenderObject::canHaveChildren): Return false.
        * khtml/rendering/render_container.h: Declare new member function.
        * khtml/rendering/render_container.cpp: (RenderContainer::canHaveChildren): Return true.
        * khtml/rendering/render_replaced.h: Declare new member function.
        * khtml/rendering/render_replaced.cpp: (RenderReplaced::canHaveChildren): Return false.

        * khtml/xml/dom_nodeimpl.h: Declare new member functions.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::createRendererIfNeeded): Added. Checks to see if a renderer should be created,
	and creates it if so. The bug fix is checking canHaveChildren() here. This also reduces
	the amount of repeated code in various attach() methods.
        (NodeImpl::styleForRenderer): Added. Default is parent style.
        (NodeImpl::rendererIsNeeded): Added. Default is to create only if display is not none.
        (NodeImpl::createRenderer): Added. Must never reach this function, but I didn't make it a pure
	virtual because of subclasses like AttrImpl that don't ever call createRendererIfNeeded.
	Could rethink this and improve it even more.

        * khtml/xml/dom_elementimpl.h: Declare new member functions.
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::styleForRenderer): Override to get the style from the style selector rather
	than from the parent renderer.
        (ElementImpl::createRenderer): Call RenderObject::createObject to create the right type of renderer.
        (ElementImpl::attach): Call createRendererIfNeeded to do most of the work.

        * khtml/html/html_baseimpl.h: Declare new member functions.
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::createRenderer): Create a RenderBody.
        (HTMLBodyElementImpl::attach): Call createRendererIfNeeded to do most of the work.
        (HTMLFrameElementImpl::rendererIsNeeded): Override to implement the different policy
	this element uses to decide whether to make a renderer (same as old code).
        (HTMLFrameElementImpl::createRenderer): Create a RenderFrame.
        (HTMLFrameElementImpl::attach): Call createRendererIfNeeded to do most of the work.
        (HTMLFrameSetElementImpl::rendererIsNeeded): Override to implement the different policy
	this element uses to decide whether to make a renderer (same as old code).
        (HTMLFrameSetElementImpl::createRenderer): Create a RenderFrameSet.
        (HTMLFrameSetElementImpl::attach): Call createRendererIfNeeded to do most of the work.
	This fixes a bug where the parent doesn't have a renderer; we were asserting in
	that case rather than just not creating a renderer ourselves, which was wrong.
        (HTMLHtmlElementImpl::rendererIsNeeded): Override to implement the different policy
	this element uses to decide whether to make a renderer (same as old code).
        (HTMLHtmlElementImpl::createRenderer): Create a RenderHtml.
        (HTMLHtmlElementImpl::attach): Call createRendererIfNeeded to do most of the work.
        (HTMLIFrameElementImpl::createRenderer): Create a RenderPartObject.
        (HTMLIFrameElementImpl::attach): Call createRendererIfNeeded to do most of the work.

        * khtml/html/html_formimpl.h: Declare new member functions.
        * khtml/html/html_formimpl.cpp:
        (HTMLGenericFormElementImpl::attach): Remove now-unneeded code that is handled by
	createRendererIfNeeded now.
        (HTMLInputElementImpl::rendererIsNeeded): Return false for HIDDEN, otherwise call base.
        (HTMLInputElementImpl::createRenderer): Create the appropriate type of RenderObject.
        (HTMLInputElementImpl::attach): Call createRendererIfNeeded to do most of the work.
	Determined that we don't need the special case for image buttons any more.
        (HTMLSelectElementImpl::createRenderer): Create a RenderSelect.
        (HTMLSelectElementImpl::attach): Call createRendererIfNeeded to do most of the work.
        (HTMLTextAreaElementImpl::createRenderer): Create a RenderTextArea.
        (HTMLTextAreaElementImpl::attach): Call createRendererIfNeeded to do most of the work.

        * khtml/html/html_imageimpl.h: Declare new member function.
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::createRenderer): Create a RenderImage.
        (HTMLImageElementImpl::attach): Call createRendererIfNeeded to do most of the work.

        * khtml/html/html_inlineimpl.h: Declare new member function.
        * khtml/html/html_inlineimpl.cpp:
        (HTMLBRElementImpl::createRenderer): Create a RenderBR.
        (HTMLBRElementImpl::attach): Call createRendererIfNeeded to do most of the work.

        * khtml/html/html_objectimpl.h: Declare new member functions.
        * khtml/html/html_objectimpl.cpp:
        (HTMLAppletElementImpl::rendererIsNeeded): Override to implement the different policy
	this element uses to decide whether to make a renderer (same as old code).
        (HTMLAppletElementImpl::createRenderer): Create either a RenderApplet or RenderEmptyApplet.
        (HTMLAppletElementImpl::attach): Call createRendererIfNeeded to do most of the work.
        (HTMLEmbedElementImpl::rendererIsNeeded): Override to implement the different policy
	this element uses to decide whether to make a renderer (same as old code).
        (HTMLEmbedElementImpl::createRenderer): Create a RenderPartObject.
        (HTMLEmbedElementImpl::attach): Call createRendererIfNeeded to do most of the work.
        (HTMLObjectElementImpl::rendererIsNeeded): Override to implement the different policy
	this element uses to decide whether to make a renderer (same as old code).
        (HTMLObjectElementImpl::createRenderer): Create either a RenderImage or a RenderPartObject.
        (HTMLObjectElementImpl::attach): Call createRendererIfNeeded to do most of the work.

        * khtml/xml/dom_textimpl.h: Declare new member functions.
        * khtml/xml/dom_textimpl.cpp:
        (TextImpl::rendererIsNeeded): Moved logic about not making renderers for only-whitespace
	elements here. Left out the special case for textarea, since the fact that RenderReplaced
	returns false from the canHaveChildren function now takes care of that of that case.
        (TextImpl::createRenderer): Create a RenderText.
        (TextImpl::attach): Call createRendererIfNeeded to do most of the work.

	- fixed a buffer overrun that libgmalloc detected

        * khtml/misc/decoder.cpp:
        (KanjiCode::judge): Pass in a size parameter instead of using strlen.
        (Decoder::decode): Pass in a size parameter.

	- a little housekeeping

        * WebCore.pbproj/project.pbxproj: Remove a bunch of the .moc files
	from the project. I'm not sure why I put them in originally, but they
	do no good in there.
        * khtml/khtmlview.moc: Empty out this file.

2003-01-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

 	- fixed 3145317 - Unable to add or remove menu items on Site Menu page using Safari Beta

	This turned out to be a problem with event.layerX / event.layerY.
	
        * khtml/xml/dom2_eventsimpl.cpp:
        (MouseEventImpl::computeLayerPos): Since layer position is
	relative to parent layer, go up the layer tree adjusting for layer
	offset to compute true layer position.
 
2003-01-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3151982 - missing content at debka.com after iframe is written using document.write
	- fixed 3000234 - javascript problem writing iframe at cycleworld.com

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::scriptHandler): If we come out of the script with
	the parser in skip mode, don't throw away the whole rest of the
	document - instead, parse it as usual. The parser's skip mode will
	take care of skipping stuff as needed and will detect close tags
	for special tags like <iframe>.

2003-01-20  David Hyatt  <hyatt@apple.com>

	Fix :hover performance regression on wsj.com.  Moving my
	<a name="foo"> quirk down into the :hover rule  matching code,
	so that we'll know never to apply :hover to anchorless <a>s.
	
        Reviewed by gramps

        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setHoverAndActive):

2003-01-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3132120 - onchange handler not firing on mac.com webmail

        * khtml/rendering/render_form.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::handleFocusOut): Moved empty virtual method here from render_form.
        (RenderWidget::eventFilter): Uncomment call to handleFocusOut - we
	need it to send onChange properly.
	* khtml/rendering/render_replaced.h:
        * kwq/KWQObject.h: Add empty eventFilter virtual method.
        * kwq/KWQComboBox.h: Remove no longer needed empty eventFilter.
        * kwq/KWQEvent.h: Implement a bit more of QFocusEvent.
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _createTextView]): Tell the text view its widget.
        (-[KWQTextAreaTextView setWidget:]): New method to set widget.
        (-[KWQTextAreaTextView becomeFirstResponder]): In addition to the usual stuff,
	call the widget's event filter with a focus in event.
        (-[KWQTextAreaTextView resignFirstResponder]): In addition to the usual stuff,
	call the widget's event filter with a focus out event.
        * kwq/KWQTextField.mm:
        (-[KWQTextField becomeFirstResponder]): Cleaned up a bit.
        (-[KWQTextField fieldWillBecomeFirstResponder]): Call the widget's event filter with a focus in event.
        (-[KWQTextField fieldWillResignFirstResponder]): Call the widget's event filter with a focus out event.
        * kwq/KWQView.mm:

2003-01-20  David Hyatt  <hyatt@apple.com>

	Fix for 3147213.  <nobr> is treated like other inlines now,
	so it can contain blocks.  <wbr> is also fixed.  This fixes
	tvguide.com.
	
        Reviewed by john

        * khtml/html/dtd.cpp:
        (DOM::checkChild):

2003-01-20  David Hyatt  <hyatt@apple.com>

	Gah. Fix positioned objects and floating objects so that they
	don't append themselves to the list of runs in normal flow.
	An astoundingly basic bug. :(
	
        Reviewed by john

        * khtml/rendering/bidi.cpp:
        (appendRunsForObject):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::addChildToFlow):

2003-01-19  David Hyatt  <hyatt@apple.com>

	Fixes for 3150561 (blog articles vanish on stylesheet switch) and
        and 3150560 (crash changing fixed positioned element to normal
        positioning dynamically).

        This change makes layers able to deal with dynamic changes in
        position that cause you to have to either remove a layer from
        the hierarchy while preserving the children or to insert a
        layer into the hierarchy in between a parent and its descendants.

	This patch also rewrites :hover/:active so that they can actually
	be used in selectors other than the rightmost selector (e.g., so you
	can write a rule like "li:hover > a").  

	Also, layers will now properly clear out their hover/active state
	when the mouse is no longer inside them.

	With these fixes, Eric Meyer's "Pure CSS Menus" work (perfectly)
	and the repainting problems on sites like brainjar.com and
	diveintomark.org and wired.com are fixed.
	
        Reviewed by mjs and john.

        * khtml/css/css_stylesheetimpl.h:
        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseSelector):
        * khtml/css/cssparser.h:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/dom/html_head.cpp:
        (HTMLLinkElement::setDisabled):
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::appendChildNode):
        (RenderContainer::insertChildNode):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::setStyle):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::addChild):
        (RenderLayer::removeOnlyThisLayer):
        (RenderLayer::insertOnlyThisLayer):
        (RenderLayer::clearOtherLayersHoverActiveState):
        (RenderLayer::clearHoverAndActiveState):
        (RenderLayer::nodeAtPoint):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::addLayers):
        (RenderObject::moveLayers):
        (RenderObject::findNextLayer):
        (RenderObject::setStyle):
        (RenderObject::setHoverAndActive):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::recalcStyle):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::setActive):

2003-01-17  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3149511 - Blogger.com window closes after update is posted
	
        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): For now, don't allow closing the window at
	all if it wasn't opened by JavaScript, since we don't support the
	history object and so can't tell if the window has only one
	history item.

2003-01-17  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed the crashing so the layout tests work

        * khtml/rendering/render_layer.h: Add a node pointer result.
        * khtml/rendering/render_layer.cpp: (RenderLayer::elementList):
	Return the node pointer so we can destroy it when done with it.

        * khtml/rendering/render_object.h: Make renderArena() const.
        * khtml/rendering/render_object.cpp: (RenderObject::renderArena): Make it const.

        * kwq/KWQRenderTreeDebug.cpp: (writeLayers): Free the Z layer list when done.
	Without this things just crashed.

2003-01-17  Richard Williamson   <rjw@apple.com>

        Fixed 3126141. Allow pages with plugins to be cached.  This is safe
        because plugins are cleanly started/stopped when their containing views are
        added/removed from the view hierarchy.
        
        Reviewed by trey.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::canCachePage):

2003-01-17  David Hyatt  <hyatt@apple.com>

	The new table code from Lars.  Also includes bug fixes for
	percentage height children in table cells, for positioning
	of tables, and for width distribution of percentage width
	cells.
	
        Reviewed by darin

        * ForwardingHeaders/rendering/table_layout.h: Added.
        * WebCore.pbproj/project.pbxproj:
        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseValue):
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssvalues.c:
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/css/html4.css:
        * khtml/dom/html_table.cpp:
        (HTMLTableElement::insertRow):
        (HTMLTableElement::deleteRow):
        (HTMLTableRowElement::insertCell):
        (HTMLTableRowElement::deleteCell):
        (HTMLTableSectionElement::insertRow):
        (HTMLTableSectionElement::deleteRow):
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::HTMLTableElementImpl):
        (HTMLTableElementImpl::setTFoot):
        (HTMLTableElementImpl::setTBody):
        (HTMLTableElementImpl::createTHead):
        (HTMLTableElementImpl::createTFoot):
        (HTMLTableElementImpl::insertRow):
        (HTMLTableElementImpl::deleteRow):
        (HTMLTableElementImpl::addChild):
        (HTMLTableElementImpl::parseAttribute):
        (HTMLTableElementImpl::attach):
        (HTMLTablePartElementImpl::parseAttribute):
        (HTMLTableSectionElementImpl::HTMLTableSectionElementImpl):
        (HTMLTableSectionElementImpl::~HTMLTableSectionElementImpl):
        (HTMLTableSectionElementImpl::insertRow):
        (HTMLTableSectionElementImpl::deleteRow):
        (HTMLTableSectionElementImpl::numRows):
        (HTMLTableRowElementImpl::rowIndex):
        (HTMLTableRowElementImpl::insertCell):
        (HTMLTableRowElementImpl::deleteCell):
        (HTMLTableCellElementImpl::HTMLTableCellElementImpl):
        (HTMLTableCellElementImpl::parseAttribute):
        (HTMLTableCellElementImpl::attach):
        (HTMLTableColElementImpl::HTMLTableColElementImpl):
        (HTMLTableColElementImpl::parseAttribute):
        * khtml/html/html_tableimpl.h:
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):
        (KHTMLParser::getElement):
        * khtml/rendering/bidi.cpp:
        (RenderFlow::layoutInlineChildren):
        * khtml/rendering/render_body.cpp:
        (RenderBody::availableHeight):
        * khtml/rendering/render_body.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::contentWidth):
        (RenderBox::contentHeight):
        (RenderBox::calcReplacedWidth):
        (RenderBox::calcReplacedHeight):
        (RenderBox::availableHeight):
        (RenderBox::calcAbsoluteVertical):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layoutBlockChildren):
        (RenderFlow::leftOffset):
        (RenderFlow::rightOffset):
        (RenderFlow::addOverHangingFloats):
        (RenderFlow::calcBlockMinMaxWidth):
        (RenderFlow::calcMinMaxWidth):
        * khtml/rendering/render_form.cpp:
        * khtml/rendering/render_form.h:
        * khtml/rendering/render_frames.cpp:
        * khtml/rendering/render_frames.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        (RenderObject::paddingTop):
        (RenderObject::paddingBottom):
        (RenderObject::paddingLeft):
        (RenderObject::paddingRight):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::calcMinMaxWidth):
        * khtml/rendering/render_root.cpp:
        (RenderRoot::RenderRoot):
        (RenderRoot::layout):
        (RenderRoot::paintObject):
        * khtml/rendering/render_root.h:
        * khtml/rendering/render_style.cpp:
        (StyleSurroundData::StyleSurroundData):
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_table.cpp:
        (RenderTable::RenderTable):
        (RenderTable::~RenderTable):
        (RenderTable::setStyle):
        (RenderTable::position):
        (RenderTable::addChild):
        (RenderTable::calcWidth):
        (RenderTable::layout):
        (RenderTable::setCellWidths):
        (RenderTable::paint):
        (RenderTable::calcMinMaxWidth):
        (RenderTable::splitColumn):
        (RenderTable::appendColumn):
        (RenderTable::colElement):
        (RenderTable::recalcSections):
        (RenderTable::removeChildNode):
        (RenderTable::dump):
        (RenderTableSection::RenderTableSection):
        (RenderTableSection::~RenderTableSection):
        (RenderTableSection::detach):
        (RenderTableSection::setStyle):
        (RenderTableSection::addChild):
        (RenderTableSection::ensureRows):
        (RenderTableSection::addCell):
        (RenderTableSection::setCellWidths):
        (RenderTableSection::calcRowHeight):
        (RenderTableSection::layoutRows):
        (RenderTableSection::paint):
        (RenderTableSection::recalcCells):
        (RenderTableSection::clearGrid):
        (RenderTableSection::removeChildNode):
        (RenderTableSection::dump):
        (RenderTableRow::RenderTableRow):
        (RenderTableRow::detach):
        (RenderTableRow::setStyle):
        (RenderTableRow::addChild):
        (RenderTableRow::removeChildNode):
        (RenderTableRow::dump):
        (RenderTableRow::layout):
        (RenderTableCell::RenderTableCell):
        (RenderTableCell::detach):
        (RenderTableCell::updateFromElement):
        (RenderTableCell::getCellPercentageHeight):
        (RenderTableCell::setCellPercentageHeight):
        (RenderTableCell::calcMinMaxWidth):
        (RenderTableCell::baselinePosition):
        (RenderTableCell::setStyle):
        (RenderTableCell::paint):
        (RenderTableCell::paintBoxDecorations):
        (RenderTableCell::dump):
        (RenderTableCol::RenderTableCol):
        (RenderTableCol::updateFromElement):
        (RenderTableCol::addChild):
        (RenderTableCol::dump):
        * khtml/rendering/render_table.h:
        * khtml/rendering/table_layout.cpp: Added.
        (FixedTableLayout::FixedTableLayout):
        (FixedTableLayout::~FixedTableLayout):
        (FixedTableLayout::calcWidthArray):
        (FixedTableLayout::calcMinMaxWidth):
        (FixedTableLayout::layout):
        (AutoTableLayout::AutoTableLayout):
        (AutoTableLayout::~AutoTableLayout):
        (AutoTableLayout::recalcColumn):
        (AutoTableLayout::fullRecalc):
        (AutoTableLayout::calcMinMaxWidth):
        (AutoTableLayout::calcEffectiveWidth):
        (AutoTableLayout::insertSpanCell):
        (AutoTableLayout::layout):
        (AutoTableLayout::calcPercentages):
        * khtml/rendering/table_layout.h: Added.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createHTMLElement):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::NodeImpl):
        (NodeImpl::dump):
        * khtml/xml/dom_nodeimpl.h:

2003-01-17  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- clean room rewrite of QCString::operator<<.

        * kwq/KWQCString.mm: (operator<<): Rewrote it.

	- update format of render tree dumping for real use

        * khtml/rendering/render_layer.h: Added elementList().
        * khtml/rendering/render_layer.cpp: (RenderLayer::elementList): Added.

        * kwq/KWQRenderTreeDebug.cpp:
        (operator<<): Added an overload for writing out QRect.
        (writeIndent): Added.
        (write): Use the overload for QRect, also reorganize to dump layers.
        (writeLayers): Use this to dump the layers.
        (externalRepresentation): Call writeLayers instead of write.

2003-01-17  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- removed unused KWQDrawUtil code

        * ForwardingHeaders/qdrawutil.h: Emptied this file out.

        * kwq/KWQDrawUtil.h: Removed.
        * kwq/KWQDrawUtil.mm: Removed.
        * WebCore.pbproj/project.pbxproj: Removed KWQDrawUtil.

2003-01-17  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- updated copyright to include expat copyrights

        * WebCore.pbproj/project.pbxproj: Added expat copyrights on the end.
	Got text of copyrights from Acknowledgments.rtf in WebBrowser.

2003-01-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 3148141 - crash in KJS::WindowFunc::tryCall leaving certain site
	
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setView): If setting the view to nil and we have a
	document, detach the document. This means that we are removing a
	frame from the tree, so we want to run it's onUnload handler now,
	rather than later when things are no longer fully hooked up.

2003-01-16  Richard Williamson   <rjw@apple.com>

        Fixed 3148932.  Account for zero width characters
        in <pre> fixed-width optimization.
        
        Reviewed by hyatt.

        * khtml/rendering/render_text.cpp:
        (RenderText::widthFromCache):
        
        Reviewed by Richard (written by Mike S.)  'Clean' implementations of these
        functions that were too similar to the Qt implementations.
        
        * kwq/KWQString.mm:
        (QString::left):
        (QString::right):
        (QString::mid):

2003-01-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3144771 - Crash in KJS::WindowFunc::tryCall leaving www.smogcheck.org

	I fixed this by making sure we couldn't send the unload event twice, which was
	happening before in certain circumstances.
	
        * khtml/khtml_part.cpp:
        (KHTMLPart::closeURL): When emitting load event, note that unload
	event has not yet been sent.
        (KHTMLPart::checkEmitLoadEvent): Note when unload event has been
	sent to avoid sending it twice.
        * khtml/khtmlpart_p.h:

2003-01-16  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- added an API for dumping the external representation of the render tree for testing

        * kwq/KWQRenderTreeDebug.h: Added.
        * kwq/KWQRenderTreeDebug.cpp: Added.

        * kwq/KWQTextStream.h: Added more overloads for operator<<.
        * kwq/KWQTextStream.mm: (QTextStream::operator<<): Implemented them.

        * kwq/WebCoreBridge.h: Added renderTreeAsExternalRepresentation.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge renderTreeAsExternalRepresentation]): Added.

	- removed remnants of an earlier more-naive cut at this same sort of thing
	- removed ForwardingHeaders from the project since that doesn't really help Project Builder

        * kwq/WebCoreTestController.h: Removed.
        * kwq/WebCoreTestController.m: Removed.
        * WebCore.exp: Removed WebCoreTestController.
        * WebCore-combined.exp: Re-generated.
        * WebCore.pbproj/project.pbxproj: Removed WebCoreTestController and ForwardingHeaders.

=== Safari-52 ===

2003-01-15  Trey Matteson  <trey@apple.com>

	3144458 - user's credentials are present in a form that is revisited via b/f or history

	We now never save/restore password fields.  Also if the page has a form with a password
	field that would be submitted securely, we do not save anything on that page.

        Reviewed by Darin.

        * force-clean-timestamp:  PB isn't smart enough to know what to rebuild.
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::formWouldHaveSecureSubmission):  Utility function.
        (HTMLFormElementImpl::attach):  Tell doc if we've added a secure form.
        (HTMLFormElementImpl::parseAttribute):  Tell doc if form became secure.
        (HTMLInputElementImpl::state):  Assert that we never save password fields.
        (HTMLInputElementImpl::restoreState):  Assert that we never restore password fields.
        (HTMLInputElementImpl::attach):  Tell doc if we've added a password field.
        * khtml/html/html_formimpl.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):  Init count of secure forms, password fields.
        (DocumentImpl::passwordFieldAdded):
        (DocumentImpl::passwordFieldRemoved):
        (DocumentImpl::hasPasswordField):  New methods to count password fields.
        (DocumentImpl::secureFormAdded):
        (DocumentImpl::secureFormRemoved):
        (DocumentImpl::hasSecureForm):  New methods to count secure forms.
        * khtml/xml/dom_docimpl.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::canCachePage):   Never let pages with password fields in the page cache.
        (KWQKHTMLPart::saveDocumentState):  Do not save form state if page has a form with
	a password field that would be submitted securely

2003-01-15  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed problem where Content-Type was coming in with suffixes like "charset"

        * kwq/WebCoreBridge.h: Add contentType and refresh parameters, and remove "headers"
	parameter, from openURL method.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Get the
	content type from a parameter, and the refresh header from a separate parameter rather
	than extracting both from a headers dictionary.

2003-01-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3147036 -- words separated only by newlines are getting rammed together on XML page
	- fixed 3147032 -- preformatted text is missing much whitespace on XML page

        * khtml/xml/xml_tokenizer.cpp: (XMLHandler::characters): Don't try to strip whitespace at all,
	because it needs to be in the DOM.

	- add support for more MIME types

        * khtml/khtml_part.cpp: (KHTMLPart::begin): Add "application/xml" and "application/xhtml+xml".

2003-01-14  David Hyatt  <hyatt@apple.com>

	Make FOUC work with XML.
	
        Reviewed by darin.

        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::attach):
        * khtml/xml/dom_xmlimpl.cpp:
        (ProcessingInstructionImpl::ProcessingInstructionImpl):
        (ProcessingInstructionImpl::checkStyleSheet):
        (ProcessingInstructionImpl::isLoading):
        (ProcessingInstructionImpl::sheetLoaded):
        (ProcessingInstructionImpl::setStyleSheet):
        * khtml/xml/dom_xmlimpl.h:

2003-01-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- first cut at XML parsing with expat

        * khtml/khtml_part.cpp: (KHTMLPart::begin): Remove APPLE_CHANGES and use the XML
	code for text/xml documents.

        * WebCore.pbproj/project.pbxproj: Added the ForwardingHeaders to the project.
	Added new QXml files, removed old ones.

        * kwq/KWQXml.h: Removed.
        * kwq/KWQXml.mm: Removed.

        * kwq/KWQXmlAttributes.h: Added.
        * kwq/KWQXmlAttributes.mm: Added.
        * kwq/KWQXmlDefaultHandler.h: Added.
        * kwq/KWQXmlDefaultHandler.mm: Added.
        * kwq/KWQXmlSimpleReader.h: Added.
        * kwq/KWQXmlSimpleReader.mm: Added.

        * kwq/KWQString.h: Add fromUtf8 functions.
        * kwq/KWQString.mm: (QString::fromUtf8): Added. Simple implementation just
	calls fromStringWithEncoding. We may need something more efficient later,
	at least for all-ASCII text.

	- other changes

        * khtml/khtml_part.h: Fix spelling of occurrence.

        * khtml/misc/decoder.cpp: (Decoder::decode): Turn on Japanese auto-detect.
	It doesn't seem to work yet, but this does no harm.

2003-01-13  Richard Williamson   <rjw@apple.com>

        Fix for 3139120.  This patch was contributed by Mitz Pettel.  It correctly
        handles the visually ordered encodings.  The patch also picks up changes
        from kde that accounts for european numbers correctly in bidiReorderLine().
        
        Reviewed by Dave.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::formData):
        * khtml/misc/decoder.cpp:
        (Decoder::setEncoding):
        * khtml/rendering/bidi.cpp:
        (RenderFlow::bidiReorderLine):
        * khtml/rendering/bidi.h:

2003-01-13  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3143781 -- submitting the same form twice doesn't work properly
	(example at directory.apple.com)

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::submitForm): Only run the "don't submit the same
	form twice" logic when the form is one that affects the frame that the form is in.

2003-01-12  Darin Adler  <darin@apple.com>

        * WebCorePrefix.h: Needed to touch this file since we now have plain C source (expat).
        * kwq/KWQKHTMLPart.cpp: Reformatted a bit.

2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- first step towards integrating expat for XML support: make it compile and link

        * kwq/KWQXml.mm: (QXmlSimpleReader::parse): Put in a placeholder that calls expat.
	Mainly just used to make sure we link.

        * WebCore.pbproj/project.pbxproj: Added expat files.

        * expat/COPYING: Added.
        * expat/Changes: Added.
        * expat/MANIFEST: Added.
        * expat/README: Added.
        * expat/expat_config.h: Added.
        * expat/lib/ascii.h: Added.
        * expat/lib/asciitab.h: Added.
        * expat/lib/expat.h: Added.
        * expat/lib/iasciitab.h: Added.
        * expat/lib/internal.h: Added.
        * expat/lib/latin1tab.h: Added.
        * expat/lib/nametab.h: Added.
        * expat/lib/utf8tab.h: Added.
        * expat/lib/xmlparse.c: Added.
        * expat/lib/xmlrole.c: Added.
        * expat/lib/xmlrole.h: Added.
        * expat/lib/xmltok.c: Added.
        * expat/lib/xmltok.h: Added.
        * expat/lib/xmltok_impl.c: Added.
        * expat/lib/xmltok_impl.h: Added.
        * expat/lib/xmltok_ns.c: Added.

2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- minor cleanup of plug-in-related classes in ECMA directory

        * khtml/ecma/kjs_navigator.cpp: Remove unneeded PluginBase member functions
	ref() and deref(). Instead just make Plugin and MimeType both derive from
	PluginBase and remove APPLE_CHANGES.
        (Navigator::getValueProperty): Don't use "Konqueror" for the fallback.
	Just return Undefined() for that case since we will never reach it anyway.

	- simplify the logic in khtmlMoveMouseEvent so it's easier to decipher

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): By merging two
	identical if statements, the logic of this function becomes much clearer.

2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed a bunch of places where KHTML did !x == y instead of !(x == y) or x != y.

        * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule):
        * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode):
        * khtml/misc/loader.cpp: (Cache::requestImage), (Cache::requestStyleSheet):
        * khtml/rendering/render_flow.cpp: (RenderFlow::setStyle):
	Changed !x == y to x != y. In each case, there's a reason that this does not create
	any problem in practice, which is why we didn't rush to get this in for beta 1.

2003-01-11  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3144789 -- reproducible crash in KHTMLParser::freeBlock on a page at www.library.arizona.edu

        * khtml/html/htmlparser.cpp: (KHTMLParser::finished): Call freeBlock here rather than
	waiting until the parser is destroyed. This fixes the bug because when the parser is
        destroyed, the document is already destroyed, so we have a dangling current pointer to an
	already-destroyed node.

	- fixed 3142024 -- crash/hang/assert on java.sun.com in HTMLTokenizer

	The bug was caused by an erroneous clicked signal that was being emitted by
	QListBox at just the wrong time.

        * kwq/KWQListBox.h: Added _changingSelection boolean.
        * kwq/KWQListBox.mm: (QListBox::QListBox): Set _changingSelection to false.
        (QListBox::setSelected): Set _changingSelection to true.
        (-[KWQListBoxTableViewDelegate tableViewSelectionDidChange:]): Only emit the "clicked"
	signal if _changingSelection is false.

        * khtml/html/htmltokenizer.h: Add debug-only boolean inWrite.
        * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::HTMLTokenizer): Set inWrite to false.
	(HTMLTokenizer::write): Set inWrite to true.
	(HTMLTokenizer::~HTMLTokenizer): Assert that inWrite is not true.

2003-01-11  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3136944 -- mouseover feedback over non-mapped part of image map claims
	link to current page

        * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]):
	Change code so we won't call completeURL and complete a null ATTR_HREF (which is distinct
	from an empty ATTR_HREF). Did a similar cleanup on the image code.

2003-01-09  Darin Adler  <darin@apple.com>

        * WebCore.pbproj/project.pbxproj: Add the year 2003, remove CFBundleIconFile,
	bump marketing version to 0.8.1 and version to 52u to keep up with the branch,
	remove NSHumanReadableCopyright, remove NSPrincipalClass, remove SKIP_INSTALL
	that was in the Info plist instead of project settings.

        * English.lproj/InfoPlist.strings: Update to match above.

2003-01-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed Radar 3143013 - hang trying to load spiny.com/software
	
        * khtml/rendering/render_table.cpp:
        (RenderTable::layoutRows): Check for the render root as a loop
	termination condition, to avoid an infinite loop for an absolute
	but non-fixed table cell.

2003-01-09  David Hyatt  <hyatt@apple.com>

	The "flow-mode" quirk for lists is just that - a quirk, and should
	not be applied when in strict mode.

	Fixes diveintomark.org's navigation bar on the front page (issue #2
	on his list).
	
        Reviewed by darin and maciej

        * khtml/css/html4.css:

2003-01-08  David Hyatt  <hyatt@apple.com>

	Finish the KONQBLOCK removal and make sure that table rows and
	cells encountered inside stray content cause the stray content to
	close so that the rows and cells can be part of the table.

	This fixes the versiontracker bug.  #3142319.
	
        Reviewed by darin.

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::reset):
        (isTableRelatedTag):
        (KHTMLParser::insertNode):
        (KHTMLParser::popOneBlock):
        * khtml/html/htmlparser.h:

2003-01-08  David Hyatt  <hyatt@apple.com>

	Revert the redundancy that dirk noticed.

	Fixing issue #3 on diveintomark.org's list, which actually involved
	merging calcAbsoluteVertical to KHTML's trunk and then fixing
	a math error in the bottom computation.
	
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseAttribute):
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcAbsoluteVertical):

2003-01-08  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3111432 - Support OBJECT tags with type text/plain or text/html

        Reviewed by dave.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::createPart): call [_bridge frameRequiredForMIMEType:] to determine if we should create a plug-in view or iframe 
        * kwq/WebCoreBridge.h: add frameRequiredForMIMEType:

2003-01-08  Trey Matteson  <trey@apple.com>

	3136213 - Page loads stopped by backtracking don't finish when moving forward

	We need to remove the entry from the KHTML image cache when a load
	has an error, so it will be reloaded next time we try.	

        Reviewed by Darin,

        * khtml/misc/loader.cpp:
        (Loader::slotFinished):  Remove cache entry on job error.

2003-01-08  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 96/72 dpi snafu; no need to do something different for AppKit,
          because it always uses pixel sizes, not font size

        * khtml/css/css_valueimpl.cpp:
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssstyleselector.cpp:
        * kwq/KWQPaintDeviceMetrics.mm:
	Rolled out change from 2002-12-05

	- a cut at implementing heretofore unimplemented QTextStream classes

        * kwq/KWQTextStream.h:
        * kwq/KWQTextStream.mm:
	First cut implementation.

2003-01-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by no one cause I'm just changing copyright strings.

        * WebCore.pbproj/project.pbxproj: Added non-Apple copyrights to
	copyright strings.
        * English.lproj/InfoPlist.strings: Likewise.

2003-01-05  Darin Adler  <darin@apple.com>

        * Resources/Info.plist: Fix "Apple Compupter" typo.

2003-01-04  Trey Matteson  <trey@apple.com>

	3098388 - Pressing the back button goes back two levels at allmusic.com	

	When processing an assignment to document.location, allow items to be added
	to history.  This parallels the existing treatment of window.location.href.

        Reviewed by Richard, Darin

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::putValue):  Pass false for lockHistory arg of scheduleRedirection()

2003-01-04  Richard Williamson   <rjw@apple.com>

        I checked in kjs_window.cpp by accident.  The only change
        was a logging printf.  Back out that change.
        
        Reviewed by me.

        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall):

2003-01-03  Richard Williamson   <rjw@apple.com>

        Fix for 3138425. Don't open a new window when document.open() is called
        with < 2 parameters.
        
        Reviewed by darin.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocFunction::tryCall):
        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall):

2003-01-03  Richard Williamson   <rjw@apple.com>

        Fixed 3138743, 3138678, and 3138854.  Removed the RenderText
        widths cache, replaced it with a much simply monospace character
        cache.  Should be much faster for covered cases too!  Also fixed
        buffer overrun problem causing the crash in 3138854.
        
        Reviewed by darin.

        * khtml/rendering/font.cpp:
        (Font::isFixedPitch):
        * khtml/rendering/font.h:
        * khtml/rendering/render_text.cpp:
        (TextSlave::checkSelectionPoint):
        (RenderText::RenderText):
        (RenderText::setStyle):
        (RenderText::~RenderText):
        (RenderText::shouldUseMonospaceCache):
        (RenderText::cacheWidths):
        (RenderText::widthFromCache):
        (RenderText::trimmedMinMaxWidth):
        (RenderText::calcMinMaxWidth):
        (RenderText::setText):
        (RenderText::width):
        * khtml/rendering/render_text.h:
        * kwq/KWQFont.h:
        * kwq/KWQFont.mm:
        (QFont::isFixedPitch):
        * kwq/WebCoreTextRendererFactory.h:
        * kwq/WebCoreTextRendererFactory.m:
        (-[WebCoreTextRendererFactory isFontFixedPitch:]):

2003-01-03  John Sullivan  <sullivan@apple.com>
	
	- fixed 3138673 -- reproducible crash in JavaScript

        Reviewed by Darin, OK'ed by Don.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::setTitle):
	Check for nil view or nil part before dereferencing.

2003-01-03  David Hyatt  <hyatt@apple.com>

	Fix for percentage table heights.  A check was missing to
	look for a fixed height on the containing block.
	
        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTable::layoutRows):

=== Alexander-48 ===

2003-01-02  David Hyatt  <hyatt@apple.com>

	Fix for 3136473.  <object>s with no specified size should be
	0x0.  They should not be 300x200.  Fixes thinker.org.
	
        Reviewed by john and darin.

        * khtml/rendering/render_frames.cpp:
        (RenderPart::intrinsicWidth):
        (RenderPart::intrinsicHeight):

2003-01-02  Darin Adler  <darin@apple.com>

        Reviewed by Maciej and Trey.

	- fixed 3138063 -- REGRESSION: JavaScript-submitted form activates input type=image (webmail.mac.com)

	JavaScript-submitted forms must not get a submit button activated as return-key-submitted ones do.

        * khtml/html/html_formimpl.h: Add boolean activateSubmitButton parameter to submit.
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::prepareSubmit): Pass true for activateSubmitButton.
        (HTMLFormElementImpl::submit): Only activate a button if activateSubmitButton is true.

        * khtml/dom/html_form.cpp: (HTMLFormElement::submit): Pass false for activateSubmitButton.

2003-01-02  David Hyatt  <hyatt@apple.com>

	Fix for the 3137790.   This patch passes the mouse event x and y as 
	distinct arguments to constructZTree, so that the damageRect can 
	really reflect your clip rect.  
	This allows me to prune out layers that are clipped so
	that if x,y aren't inside the clip rect, the layer doesn't get added to
	the list.

	This patch also makes the "clip" property apply to the element that specifies the clip instead of to the element's kids.  This is ambiguous in the spec, but it turns out other browsers do it this way, so there really is an interpretation that must be fol


lowed. :)
        
	Reviewed by darin

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::nodeAtPoint):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:

2003-01-02  David Hyatt  <hyatt@apple.com>

	Fix for bug #3137935.  When a float causes a line to get
	moved down past the float, the line would incorrectly break
	rather than expanding to use the newly-available width.
	
        Reviewed by darin.

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):

2003-01-02  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3131190 -- <textarea wrap="hard"> eats text on blur

        * kwq/KWQTextArea.mm: (-[KWQTextArea paragraphs]): Add missing parentheses so we don't
	always return 0 or 1 for the number of paragraphs.

2002-12-31  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3130831 - HOMEPAGE: JavaScript that tries to intercept onmousedown fails, image gets dragged instead
	- fixed 3125554 - while dragging to select text in a nested frame, you can start dragging a link or image
	
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
	(KWQKHTMLPart::KWQKHTMLPart): Initialize new mouseDownMayStartDrag
	and mouseDownMayStartSelect methods.
        (KWQKHTMLPart::khtmlMousePressEvent): Make sure a mouse down
	won't be used to start a drag or selection if the default action
	is prevented on the mouse down event.
	(KWQKHTMLPart::mouseDown): Since the default action wasn't
	prevented, decide if this might be the start of a drag or
	selection.
        (KWQKHTMLPart::khtmlMouseMoveEvent): On a drag or selection, call
	back to the bridge to handle selection or autoscrolling
	appropriately.
	* kwq/WebCoreBridge.h: Prototype new methods.

2003-01-01  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3137566 -- non-reproducible nil-dereference in KHTMLView::clearPart
	deallocating KWQPageState

        * kwq/KWQPageState.mm: (-[KWQPageState dealloc]): Add nil check.

2003-01-01  David Hyatt  <hyatt@apple.com>

	Fix tables so that malformations inside them are properly pulled
	out of the table without being flattened. 

	Fixes 3131480.
	
        Reviewed by gramps

        * khtml/html/dtd.cpp:
        (DOM::checkChild):
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):

=== Alexander-47 ===

2002-12-30  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed 3132141 -- enter key does not work with input type=image

	Made the logic handle image and submit type inputs in the same way.

        * khtml/html/html_formimpl.h: Remove unused m_clicked flags.
        * khtml/html/html_formimpl.cpp:
        (HTMLButtonElementImpl::HTMLButtonElementImpl): Remove code to set the m_clicked flag.
	The only place this flag was looked at is better handled by the m_activeSubmit flag.
        (HTMLButtonElementImpl::defaultEventHandler): Remove more m_clicked flag code.
        (HTMLInputElementImpl::HTMLInputElementImpl): Remove more m_clicked flag code.
        (HTMLInputElementImpl::isSuccessfulSubmitButton): An image is also a successful submit
	button, and unlike a submit element, it doesn't require a name because it will just submit
        x and y with no name in that case. I suppose we could rename this function, but I think it's
        still a pretty clear name even if not 100% accurate.
        (HTMLInputElementImpl::encoding): Remove use of m_clicked and use m_activeSubmit instead.
	This was the only place using m_clicked at all. Also remove bogus check for a -1 coordinate.
	The coordinate defaults to 0, not -1, and it was never happening.
        (HTMLInputElementImpl::defaultEventHandler): Remove more m_clicked flag code.

2002-12-30  David Hyatt  <hyatt@apple.com>

	Fix for 3129016, make sure that zero-height tables and lists
	will be skipped in a search for floats that occur before
	them.  Makes usatoday work.
	
        Reviewed by gramps

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::clearFloats):

2002-12-30  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3135642 -- ad frames are missing at channels.netscape.com

        * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): Updated to use the
	same rule as Mozilla: Empty URL for an iframe means "about:blank".

        * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Loosen things so that it's safe for
	a frame to manipulate an empty child frame, as well as an empty opened window. Also remove
	the useless check for an empty document -- it never happens in practice.

2002-12-30  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin and Gramps

	Fix for this bug:

	Radar 3136795 (type URL with ../ in it, get assertion)

	The code to remove relative portions from URLs was eating leading slashes on
	URL paths. This caused absolute paths with relative portions to get mangled,
	resulting in a URL that the engine could not use. Now, leading slashes are no
	longer removed from URL paths, resulting in usuable URLs.

        * kwq/KWQKURL.mm:
        (copyPathRemovingDots)

2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3103287 -- body of page not rendered (page uses JavaScript trick to be both a frameset and a frame)

	Our self-reference protection prevented this page from working.
	To fix the bug, I did three things:

   	    1) fixed the hole in the WebCore self-reference protection, so we could remove the WebKit one
               (the hole was that it didn't ignore #xxx suffixes)
 	    2) moved the self-reference protection into a single function so it wasn't copied and pasted all over
	    3) allowed one level of self-reference; still enough to prevent infinite recursion

	Then I tested with the site from bug 3103287 and the one from bug 3083732 to make sure that was still OK.

        * khtml/html/html_baseimpl.h: Added isURLAllowed().
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::isURLAllowed): Added. Does the self-reference check and the "local only" check.
	This logic was repeated in three different places before. Note that since we don't use the "local only"
        feature, it's not too risky to slightly change how it works.
        (HTMLFrameElementImpl::updateForNewURL): Use isURLAllowed.
        (HTMLFrameElementImpl::attach): Ditto.
        (HTMLIFrameElementImpl::attach): Ditto.

2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3130566 -- REGRESSION: list item numbers are overlapping the text of the list items

	Moved the hack that handles list items that are not in lists out of the parser and into
	the DOM and Render tree code itself. This fixes the issue where the parser doesn't know which
	will be the parent node of the list item, and other problems with the old hack.

        * khtml/html/html_listimpl.cpp: (HTMLLIElementImpl::attach): Find the parent list (OL or UL).
	If there is no parent list, set a "not in list" flag on the render object so it knows to render
	"inside" no matter what the style says. Also use this parent and a safer check to make the
	start attribute work even when there is an intervening DOM element in the hierarchy.

        * khtml/html/htmlparser.cpp: (KHTMLParser::getElement): Remove the code that tries to set
	the style of an LI based on the current node at the time it's parsed, because the current node
	is now often not the OL or the UL due to our DTD fix to allow other nodes in lists.

        * khtml/rendering/render_list.h: Add isInside() to RenderListMarker, setNotInList(), notInList(),
	and _notInList to RenderListItem.

        * khtml/rendering/render_list.cpp:
        (RenderListItem::RenderListItem): Initialize _notInList to false.
        (RenderListMarker::paintObject): Use isInside() instead of checking listStylePosition().
        (RenderListMarker::calcMinMaxWidth): Ditto.
        (RenderListMarker::baselinePosition): Ditto.
        (RenderListMarker::isInside): Return true if we are not in a list, or if "inside" style is requested.

2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3134346 -- country menu at www.apple.com does not work when you go back to that page

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): Add call to checkCompleted().

2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3136391 -- PianoNanny.com screens turn to garbage when resized

	Turns out browsers pass open calls to the window object if they show up at the document
	with parameters. We now emulate that too.

        * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): If we get an open call with
	parameters, pass it on to the window.

2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3134560 -- Lord of the Rings desktops don't load

        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Removed the APPLE_CHANGES here.
	The comment claims that we don't need the code because "JavaScript will do the work
	below on demand", but that's not true for setting the base URL. Also, the comment
	claims that this "adds an extra entry to the back/forward list", but testing does not
	bear that out.

=== Alexander-46 ===

2002-12-28  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Gramps and Richard.

	Fix for this bug:

	Radar 3112233 (400 response when attaching files at mail.yahoo.com)

	KHTML multipart form code called into KMimeType class to determine
	the mime type for file attachments, however, our implementation of
	KMimeType has only stubs which call ERROR.

	I added some code into KWQKHTMLPart and WebCoreBridge so that the
	code in html_formimpl can call through to the WebFoundation mime
	file map we maintain.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::formData)
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::mimeTypeForFileName)
        * kwq/WebCoreBridge.h:

2002-12-26  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3136262 -- Shockwave Flash at movies.yahoo.com does not work

        * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget):
	Moved the class ID special case MIME types out of the if statement so they can be shared
	in the case where we have an embed tag but no MIME type.

2002-12-26  Darin Adler  <darin@apple.com>

        Reviewed by Don.

        * kwq/KWQAssertions.h: Fixed CRASH macro to use 0xbbadbeef instead of 0xbadbeef
	to reduce the chance that the address will be valid once we have allocated a lot of memory.

2002-12-24  Richard Williamson   <rjw@apple.com>

        Fix for 3134543 (and widely reported dupes).  Don't use render_text
        widths cache except for whitespace == PRE.  The problem was that additional
        spaces in the RenderText's string were being inappropiately measured.
        An alternate, more complex and risky, fix would account for the whitespace
        properties during scanning of the RenderText width buffer.  Considering 
        the scenario for which this optimization was added (3133261), this
        simpler fix is adequate.
        
        Reviewed by Darin and Don.

        * khtml/rendering/render_text.cpp:
        (RenderText::computeWidths):

2002-12-24  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3135010 -- nil-dereference in KHTMLPart::xmlDocImpl() at channels.netscape.com

        * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::contentDocument):
        Add missing nil check. Also added lots of FIXME comments about problems I observed here.

2002-12-24  Darin Adler  <darin@apple.com>

        Reviewed by Richard and Don.

	- fixed 3133207 -- crash in HTMLFrameElementImpl updateForNewURL at home.real.com

	My previous attempt to fix this dealt with the case where a RenderFrame object was
	not yet created, but not with the case where a RenderFrame object was created without
	a corresponding part. Somehow I overlooked this last time when I was doing testing.
	Testing this time confirms this takes care of the remaining problem at movies.real.com.

        * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::updateForNewURL):
	Use the same kind of requestFrame call here as in attach when there's a RenderFrame,
	but no corresponding part. Maybe we can fix this an even more elegant way later.

=== Alexander-45 ===

2002-12-23  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3134558 -- REGRESSION: Lord of the Rings site problems

	This regression was caused when we fixed the abcnews.com problem (3124933).

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createEmptyDocument):
	Despite its name, this function was never intended to overwrite an existing document with
	an empty document. When we changed it do do the creation in a better way, we lost the
	check that prevents it from doing anything at all if we already have a document.

2002-12-22  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3134383 -- crash in KWQKHTMLPart::canCachePage at www.apple.com

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::canCachePage):
	Check for nil in the result of Window::retrieveWindow.

=== Alexander-44 ===

2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Trey and Don.

	- fixed 3132160 -- meta refresh does not work if there's a space after the refresh interval value

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
	Added a call to stripWhiteSpace here. The other places that processes delays for
	meta refresh already had the stripWhiteSpace call, but this was missing it.

2002-12-20  David Hyatt  <hyatt@apple.com>

	Fix for 3134163, a regression from the reduction of
	styleForElement calls.  Make sure image buttons
	get the width attribute and add it to style info
	before styleForElement gets called.
	
        Reviewed by rjw

        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::attach):

2002-12-20  David Hyatt  <hyatt@apple.com>

	Fix for 3134133. Back out the render_text code I gave to rjw
	to check in.  It wasn't filling in a value for hasBreak, so it
	became random whether or not you'd break or not.
	
        Reviewed by rjw

        * khtml/rendering/render_text.cpp:
        (RenderText::trimmedMinMaxWidth):
        (RenderText::calcMinMaxWidth):
        * khtml/rendering/render_text.h:

2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed 3133801 -- REGRESSION: Japanese page comes up hash

        * khtml/khtml_part.cpp: (KHTMLPart::write): Roll back to original KHTML code here,
	removing the "all ASCII" optimization.

2002-12-20  David Hyatt  <hyatt@apple.com>

	Fix for 3133081, slashdot messed up when changing font sizes.
	setStyle in RenderFlow was messed up for continuations.  A
	block in the middle of a continuation incorrectly propagated
	its style to the following inlines.
	
        Reviewed by darin

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::setStyle):

2002-12-20  Richard Williamson   <rjw@apple.com>

        Fix for 3133601.  Play the same trick we do in
        KHTMLPartBrowserExtension::openURLRequest to create an empty
        document if necessary.
        
        Reviewed by darin.

        * khtml/ecma/kjs_window.cpp:
        (Window::get):

2002-12-19  David Hyatt  <hyatt@apple.com>

	Remove the clip hack from setLayout and make it
	asynchronous instead.  This fixes the crasher
	on autosite.com, which had a sync layout occur
	while in the middle of making a block box's
	children get wrapped in anonymous boxes.  It
	was only half done when the layout got
	triggered, which is what caused the assert to fire.

	The bug # is 3129534.
	
        Reviewed by rjw

        * khtml/khtmlview.cpp:
        (KHTMLView::KHTMLView):
        (KHTMLView::timerEvent):
        (KHTMLView::scheduleRelayout):
        * khtml/khtmlview.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setLayouted):
        (RenderObject::scheduleRelayout):
        * khtml/rendering/render_object.h:

2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3129387 -- Stopped responding to controls while filling out form (exception in KWQTextArea)

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix code that was returning the wrong
	paragraph number along with the index within the paragraph. Also made it return a paragraph one
	past the end with an index of 0 for cases where you are at the end of the text.
        (-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Range check the passed-in index. This
	would also have prevented the exception.

=== Alexander-43 ===

2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3132382 -- crash in khtml::CachedImage

	The source of this bug was my long-ago fix to bug 3079499.
	I changed the code to copy the clients list. But this doesn't work if
	one of the clients is removed while iterating because it's deleted.
	So I made a new class, CachedObjectClientWalker, that does the iterating safely.
	Now both this new bug and the original are fixed.

        * khtml/misc/loader.cpp:
        (CachedCSSStyleSheet::checkNotify): Use CachedObjectClientWalker to walk the list.
        (CachedScript::checkNotify): Ditto.
        (CachedImage::do_notify): Ditto.
        (CachedImage::movieStatus): Ditto.
        (CachedImage::checkNotify): Ditto.
        (CachedObjectClientWalker::next): Walk the list using a list iterator, which is
	safe against the current item being removed. But go that safety one better by making
	sure you don't miss the item after one that's removed.

2002-12-20  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

	Fix for this bug:

	Radar 3132171 (trying to login at mypage.apple.com gives "Already Connected" message)

	The issue is that we submit the login form more than once when the user hits
	the return key to submit rather than clicking the submit button. We are also
	susceptible to double form submissions from buggy scripts that ask to submit
	more than one form.

	The fix is to prevent the KWQKHTMLPart from submitting more than one form by
	setting and checking a flag.

        * kwq/KWQKHTMLPart.h: Add a form submit flag.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::submitForm): Check form submit flag. Return if a form
	has already been submitted.
        (KWQKHTMLPart::setView): Reset form flag. This is done since the part 
	may have been retrieved for reuse from the bac/forward cache.

2002-12-20  Richard Williamson   <rjw@apple.com>

        Fixed 3133261.  This fix really has two parts.  This first part
        fixes the stupid stack allocated buffer that caused the crash.
        The second part makes any RenderText with a large string perform
        much faster.  The page mentioned in the bug used to load and draw
        in about 15 minutes.  Now it loads in about 10 seconds and draws in about
        2 seconds.  The performance optimization caches a widths array
        for the string in the RenderText, and only updates that array if
        the font or text for the RenderText change.  
        
        Reviewed by john.

        * khtml/rendering/render_text.cpp:
        (RenderText::RenderText):
        (RenderText::setStyle):
        (RenderText::~RenderText):
        (RenderText::computeWidths):
        (RenderText::widthFromBuffer):
        (RenderText::trimmedMinMaxWidth):
        (RenderText::calcMinMaxWidth):
        (RenderText::setText):
        (RenderText::width):
        * khtml/rendering/render_text.h:

2002-12-20  Trey Matteson  <trey@apple.com>

	We now build with symbols the B&I.  Deployment builds are without symbols,
	so it is easy to generate a non-huge app as a one-off.

        Reviewed by Darin

        * WebCore.pbproj/project.pbxproj:

2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3129824 -- crash in QWidget::getView in KWQKHTMLPart::passSubframeEventToSubframe

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
	Check for a nil QWidget in a RenderWidget, and ERROR and return true in that case.
	We don't want to return false because otherwise the KHTML code will try to draw a frame splitter.

2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3131449 -- crash in DOMNamedNodesCollection::tryGet opening a new window from JavaScript

        * khtml/ecma/kjs_dom.cpp: (DOMNamedNodesCollection::tryGet):
	Add range checking. If the index is out of range fall back to the parent tryGet,
	which will eventually just return Undefined().

2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Richard and John.

	- fixed 3133207 -- crash in HTMLFrameElementImpl updateForNewURL at home.real.com

	This refines Maciej's fix for 3052113, 3075392, and 3125412.

        * khtml/html/html_baseimpl.h: Remove detach() and parentWidget from HTMLFrameElementImpl.
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::HTMLFrameElementImpl): Take out initialization of unused parentWidget.
        (HTMLFrameElementImpl::updateForNewURL): Add case for when we are attached by did not allocate
	a render object. In that case we just detach so we can attach again. Also fix the self-reference
	check which was in there but not working.
        (HTMLFrameElementImpl::detach): Remove method since all it did was set unused parentWidget. 
        (HTMLIFrameElementImpl::attach): Remove unused depth computation.

	- fixed more leaks

        * khtml/rendering/render_replaced.h: Made the deref method inherited from khtml::Shared
	private by using private inheritance. Changed the name of arenaDeref to deref, but it still
	takes an arena parameter. Now incorrect deref's are compile-time errors instead of potential leaks.
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::detach): Rename arenaDeref to deref.
        (RenderWidget::resizeWidget): Ditto.
        (RenderWidget::eventFilter): Ditto.
        (RenderWidget::deref): Ditto.

        * khtml/rendering/render_form.cpp: (RenderFormElement::slotClicked):
	Pass the arena when deref'ing the RenderFormElement.
        * kwq/WebCoreBridge.h: Add a field for the arena for the RenderPart.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dealloc]): Pass the arena when deref'ing the RenderPart.
        (-[WebCoreBridge setRenderPart:]): Pass the arena when deref'ing the RenderPart. Store the arena
	of the new part when storing the part pointer.

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::~DocumentImpl): Assert that the render object is
	not nil, in an attempt to catch a leak I observed yesterday.

2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3129129 -- leak of 820 RenderStyle objects each time we run cvs-base

	The RenderStyle objects were the tip of an iceberg.
        
        I fixed a lot of leaks, but there are still some remaining.

	Note that these changes will make Development builds slower because they disable
	the arena allocator in favor of assertions that check we are using it correctly.
	But the changes make Deployment builds slightly faster.

        * khtml/html/html_baseimpl.cpp: (HTMLFrameSetElementImpl::attach):
	Fix a leak in the !isStyleAvailable() case by ref'ing and deref'ing the style.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::attach): Fix a leak by getting the style from the render
	object instead of calling styleForElement again, which makes a new one.
        (HTMLFormElementImpl::parseAttribute): Ditto.
        (HTMLInputElementImpl::attach): Fix a leak by using the style in the local
	variable rather than calling styleForElement again.

        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::parseAttribute): Fix a leak by getting the style from the render
	object instead of calling styleForElement again, which makes a new one.
        (HTMLImageElementImpl::attach): Fix a leak by using the style in the local
	variable rather than calling styleForElement again.

        * khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach):
	Fix a leak in the display() == NONE case by ref'ing and deref'ing the style.

        * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::attach): Fix a leak by using
	the style in the local variable rather than calling styleForElement again.

        * khtml/rendering/bidi.cpp:
        (BidiIterator::detach): Added debugging code to detect if someone does a delete directly,
	which will not deallocate the object because it won't run the correct arena code.
        (BidiIterator::operator delete): Ditto.
        (appendRunsForObject): Fix a leak by detaching bidi iterators when they are removed from
	the list. The list can't delete them because it doesn't have the arena pointer.
        (deleteMidpoints): Fix a leak by not removing the items from the list until done iterating.
	The old code would fail to delete half the items.

        * khtml/rendering/render_container.cpp:
        (RenderContainer::detach): Detach the continuation here. Before we removed it but did not
	detach it, which led to a leak.
        (RenderContainer::removeChild): Do not remove the continuation here. If we do, then we can't
	detach successfully. No one depends on this removing the continuation.
        (RenderContainer::removeLeftoverAnonymousBoxes): Detach the child, don't just delete it.
	This fixes a leak.

        * khtml/rendering/render_flow.cpp: (RenderFlow::removeChild): Detach the child, don't just
	delete it. This fixes a leak.

        * khtml/rendering/render_object.h: Added arenaDelete.
        * khtml/rendering/render_object.cpp:
        (RenderObject::operator delete): Added debugging code to detect if someone does a delete directly,
	which will not deallocate the object because it won't run the correct arena code.
        (RenderObject::detach): Ditto.
        (RenderObject::arenaDelete): Put the low-level delete here, so that subclasses (RenderWidget)
	can call it.

        * khtml/rendering/render_replaced.h: Add arenaDeref and make deref private so derived classes
	won't use it by accident.
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::detach): Use the new arenaDeref instead of deref, since we need to pass the
	arena pointer in to delete.
        (RenderWidget::resizeWidget): Ditto. Store the arena before calling back, since we can't get it
	once it's detached from its parent.
        (RenderWidget::eventFilter): Ditto.
        (RenderWidget::arenaDeref): Added. Calls RenderObject's arenaDelete.

	- other changes

        * khtml/rendering/render_arena.cpp:
        (RenderArena::allocate): Added debugging code that stores a signature, arena pointer, and size,
	and uses malloc rather than the arena.
        (RenderArena::free): Check the signature, arena pointer, and size, and use free.

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::operator delete): Added debugging code to detect if someone does a delete directly,
	which will not deallocate the object because it won't run the correct arena code.
        (RenderLayer::detach): Ditto.
        (RenderLayer::RenderLayerElement::operator delete): Ditto.
        (RenderLayer::RenderLayerElement::detach): Ditto.
        (RenderLayer::RenderZTreeNode::operator delete): Ditto.
        (RenderLayer::RenderZTreeNode::detach): Ditto.

        * khtml/rendering/render_text.cpp:
        (TextSlave::detach): Added debugging code to detect if someone does a delete directly,
	which will not deallocate the object because it won't run the correct arena code.
        (TextSlave::operator delete): Ditto.

        * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createContextualFragment):
	Save one new/delete by using a stack-based HTMLTokenizer and add FIXMEs about
	some possible leaks I spotted here.

        * khtml/rendering/render_list.cpp: (RenderListItem::setStyle): Took out APPLE_CHANGES from around
	a generally useful bug fix.

        * WebCore.pbproj/project.pbxproj: Let Electron be Electron. 

=== Alexander-42 ===

2002-12-19  David Hyatt  <hyatt@apple.com>

	Fix for 3129393, crasher on sundancecatalog.com.  There
	are two elements to this fix.  The basic problem was that
	sundancecatalog was saying:

	<table style="display: inline">

	In WinIE, this turns into an inline-table and not an inline.
	In Gecko this does not happen.  Like Gecko, we treated this
	as an inline, so we triggered a problem in my inline splitting
	code.  

	The first fix was to bulletproof my inline splitting code to
	ensure all new render objects are fully connected before children
	are added, so that you can get to renderArenas at all times.

	The second fix implements the WinIE quirk and turns the table
	into an inline-table so that you avoid a complete garbage
	render tree.
	
        Reviewed by trey

        * khtml/css/html4.css:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        (RenderFlow::splitFlow):
        (RenderFlow::addChildToFlow):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::lineHeight):
        * khtml/rendering/render_list.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        * khtml/rendering/render_table.cpp:
        (RenderTable::lineHeight):
        (RenderTable::baselinePosition):
        (RenderTable::setStyle):
        * khtml/rendering/render_table.h:

2002-12-19  Darin Adler  <darin@apple.com>

        Reviewed by John.

	A number of non-reproducible bugs look like they may be due to bad
	event objects. I was assuming that callers retained the events until
	the functions handling them returned, but that assumption may be wrong.
	So I'm retaining/releasing the current event. This is correct in any case.
	I'm also adding a new assertion, but since assertions are in Development
	builds only that is very low risk.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::keyEvent): Add retain/release and a new assertion.
        (KWQKHTMLPart::mouseDown): Ditto.
        (KWQKHTMLPart::mouseDragged): Ditto.
        (KWQKHTMLPart::mouseUp): Ditto.
        (KWQKHTMLPart::mouseMoved): Ditto.

=== Alexander-41 ===

2002-12-18  Richard Williamson   <rjw@apple.com>

        Added an ASSERT to ensure that 3127329 isn't still happening.
        This bug should have been fixed be earlier changes.
        
        Reviewed by darin.

        * kwq/KWQPageState.mm:
        (-[KWQPageState dealloc]):

2002-12-18  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3131267 - REGRESSION: Java 1.4.1 Applets Restarted When Window is Resized
	Fixed: 3131244 - REGRESSION: Java 1.4.1 Multiple Copies of Applet Started When Window is Resized

	Dave recently patched khtml with a fix for media content inside of table cells. The patch causes the java widget to get the layout call more than once. Calling layout more than once is perfectly allowed, but the java widget wasn't prepared for that and w
ould create a new java view for each layout. We now only create a java view when the java view hasn't already been created.

        Reviewed by darin.

        * kwq/KWQKJavaAppletWidget.mm:
        (KJavaAppletWidget::showApplet): If the view of the widget is still a KWQView, we haven't replaced it with the Java view. This stops multiple view from being created.

=== Alexander-40 ===

2002-12-18  Trey Matteson  <trey@apple.com>

	3098388 - Pressing the back button goes back two levels at allmusic.com

	In support of the fix for this bug, WebCore passes khtml's lockHistory setting
	up through the bridge.

        Reviewed by Darin

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::redirectionTimerStartedOrStopped):  Pass it along.
        * kwq/WebCoreBridge.h:

2002-12-18  Maciej Stachowiak  <mjs@apple.com>

	Reviewed by John.

	- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
	
        * English.lproj/InfoPlist.strings:

2002-12-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey and Darin.

	- fixed 3124933 - abcnews.com leads to empty window with sheet complaining about javascript: URL
	- fixed 3091248 - picture does not show up in window from epinions
	

        * khtml/ecma/kjs_window.cpp:
        (Window::get): Put back document-creating code that was in #if
	!APPLE_CHANGES.
	(Window::isSafeScript): Extend access to a window that was opened
	to no URL or to about:blank by the active window.
        (shouldLoadAsEmptyDocument): Helper for the above.
        (WindowFunc::tryCall): Update APPLE_CHANGES comments - now it's
	clear we don't need to create a document in a fresh window
	(accessing document will take care of that), and that it will be
	counter-productive, possibly adding a useless entry to the
	back/forward list.
        * khtml/khtml_part.cpp:
        (KHTMLPart::begin): If we're not loading a URL, make a dummy
	document (the call will check if we have a dummy document
	already).
        * kwq/KWQKHTMLPart.mm:
	(KWQKHTMLPart::createEmptyDocument): Isntead of setting up a
	half-assed document, ask bridge to synchronously load a fully
	assed (but empty) document. Renamed from createDummyDocument.
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::openURLRequest): Decode script. Also,
	check if return value is a string - if so, write it into the
	document. Maybe we want this to be more general.
        * kwq/KWQKURL.mm:
        (KURL::KURL): Changed to successfully resolve absolute URLs
	against an empty base URL.
        * kwq/WebCoreBridge.h: prototyped new
	loadEmptyDocumentSynchronously method.

2002-12-18  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3052731 - qt file complains about lack of active-x handler
	Fixed: 3025872 - Black square where lion should be on mgm.com

	3052731: The page has a syntax error. Notice the missing ">"? He treat this as an OBJECT without an EMBED. khtml actually has a fallback for this. They check the classid and map a mime type to it. They currently map for  realaudio and flash, but not quic


ktime. I added a quicktime mapping as well as a mapping for shockwave.

	3025872: khtml was unable to parse the EMBED tag within the OBJECT tag (similar to 3052731). When this happens, it looks at the classid and maps it to a mime type. This part was successful because it has a classid->mime type mapping for flash. The strang


e thing was that it was setting the main URL of the plug-in to "dummy". The code has this comment:

	url = "dummy"; // Not needed, but KHTMLPart aborts the request if empty

	It does this even if the url is valid. It even handles the invalid url case before even calling the part. The fix is to disable this line of code.

        Reviewed by trey.

        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::updateWidget):

2002-12-18  Trey Matteson  <trey@apple.com>

	3105755 - can't log in to amex

	The problem was on c/r khtml would not pick a submit button to add to the
	form state that is sent.  We now "activate" the first submit button that meets the
	criteria for being a "successful" form element, if no button was already
	activated by being clicked on.

        Reviewed by Darin.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::submit):  Pick a submit button to use, if none was already
	chosen by virtue of being clicked.
        (HTMLButtonElementImpl::isSuccessfulSubmitButton):  New getter to support
	submit button selection.
        (HTMLButtonElementImpl::isActivatedSubmit):  New getter on existing prop.
        (HTMLButtonElementImpl::setActivatedSubmit):  New setter on existing prop.
        (HTMLInputElementImpl::isSuccessfulSubmitButton):  New getter to support
	submit button selection.
        (HTMLInputElementImpl::isActivatedSubmit):  New getter on existing prop.
        (HTMLInputElementImpl::setActivatedSubmit):  New setter on existing prop.
        * khtml/html/html_formimpl.h:  Add new methods to common superclass.

2002-12-17  Don Melton  <gramps@apple.com>

        Reviewed by Joyce Chow.

        * khtml/misc/arena.cpp:
        * khtml/misc/arena.h:
        * khtml/rendering/render_arena.cpp:
        * khtml/rendering/render_arena.h:
        * khtml/rendering/render_layer.cpp:
        * khtml/rendering/render_layer.h:

	Changed copyright and licensing.

2002-12-17  David Hyatt  <hyatt@apple.com>

	NOWRAP was completely broken.  This fixes the problem
	and makes porsche.com look ok again.

	Bug #3131287.
	
        Reviewed by gramps

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):

2002-12-17  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

        * WebCore.pbproj/project.pbxproj: Remove signature.
        * kwq/KWQColor.mm: Turn off inlining so we can build even on the
	compiler that warns about static data in inline functions.

2002-12-17  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3120729 - HOMEPAGE: Can't set a DIV innerHTML property
	with html content starting with <html><head><head/><body>
	
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): Pop <html> and
	<body>, and remove <head> to allow a full HTML document to be made
	and inserted as a contextual fragment.

=== Alexander-39 ===

2002-12-17  David Hyatt  <hyatt@apple.com>

	Make sure that anonymous block construction works properly
	when you try to insert a block in between two inlines that
	have already been wrapped in an anonymous block.
	
        Reviewed by mjs

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::addChildToFlow):
        (RenderFlow::makeChildrenNonInline):

=== Alexander-38 ===

2002-12-16  Darin Adler  <darin@apple.com>

        Reviewed by Don and Maciej.

	- fixed 3129115 -- need Apple copyright added to open source documents

	* tons of files: Added copyright message to files we modified and
	standardized format of copyrights too.

	- fixed 3129235 -- assert in LRUList visiting apple.com if "Display images" preference is off

        * khtml/misc/loader.cpp:
        (Cache::getLRUListFor): Use the first list for 0-sized objects.
        (Cache::removeFromLRUList): Allow 0-sized objects.

	- other changes

        * khtml/rendering/render_style.h: Remove bogus unused private constructor.

        * kwq/KWQFont.h: Added copy constructor and assignment operator.
        * kwq/KWQFont.mm:
        (QFont::QFont): Copy constructor now retains the NSFont. The old version didn't which could
	cause retain/release problems.
        (QFont::operator=): Retain the new NSFont and release the old one.

        * WebCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.

2002-12-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3125283 - HOMEPAGE: in onload of an IMG, the width and height are equal to zero

	There were two problems here. First, the calls to get image width
	and height didn't force a layout in all the cases where it was
	required. Second, layout wouldn't lay out images at all until
	parsing was done, due to a hack to block inline layout until that
	point. I'm not sure if this will have other bad consquences, but
	nearly every page I tried, including Hebrew and Japanese pages as
	well as every page on the base PLT laid out properly.

        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::width): Force a layout if not laid out.
        (HTMLImageElementImpl::height): Likewise.
        * khtml/html/htmlparser.cpp:
	(KHTMLParser::insertNode): Remove setBlockBidi hack - this was
	preventing images from getting laid out until the document was
	totally done parsing.
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::RenderFlow): More setBLockBidi removal.
        (RenderFlow::layout): Likewise.
        (RenderFlow::close): Likewise.
        (RenderFlow::addChildToFlow): Likewise.
        (RenderFlow::printTree): Likewise.
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_object.h:

2002-12-16  David Hyatt  <hyatt@apple.com>

	When a clear occurs (thus causing a block to move underneath
	a float), make sure the block gets a fresh layout, so that it
	can readjust its contents now that they don't have to flow
	around the float.
	
        Reviewed by darin

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layoutBlockChildren):

2002-12-16  Richard Williamson   <rjw@apple.com>

        Fixed 3128477.  Check KJS::Window before saving js objects.

        Reviewed by darin.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::saveWindowProperties):
        (KWQKHTMLPart::saveLocationProperties):
        (KWQKHTMLPart::restoreWindowProperties):
        (KWQKHTMLPart::restoreLocationProperties):

=== Alexander-37 ===

2002-12-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3125412 - HOMEPAGE: 2nd load of html in the same div fails.
	- fixed 3052113 - HOMEPAGE: "site menu" part of .mac home page editing doesn't work
	- fixed 3075392 - HOMEPAGE: "pages" section of mac.com homepage editing is missing

        * khtml/html/html_baseimpl.h:
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::updateForNewURL): Function that loads new URL,
	to be called if src attribute is set explicitly and the element is already
	attached.
        (HTMLFrameElementImpl::parseAttribute): Call updateForNewURL when src
	attrinute is set.
        (HTMLFrameElementImpl::contentDocument): Don't involve render widget
	in getting the content document.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): Allow contextual
	fragments to be created (and therefore innerHTML to be set on) TR
	and HTML elements.

2002-12-16  David Hyatt  <hyatt@apple.com>

	Use the layer's bounds as the damage rect not the object's.
	The layer knows about the overflow out of the object.  The
	object does not.  Duh.

	Fixes disney.com bustage.
	
        Reviewed by sullivan

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::constructZTree):

2002-12-16  David Hyatt  <hyatt@apple.com>

	Code needs to go in calcMinMaxWidth instead, so parents computing
	their own minmax widths will get the correct value during the ifrst
	pass.  With this change weather.com is actually fixed.
	
        Reviewed by mjs

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidth):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::calcMinMaxWidth):

2002-12-16  David Hyatt  <hyatt@apple.com>

	Fix for 3128843, horked layout on weather.com.  Ensure that
	overflow: hidden elements bounds-check their minwidth and maxwidth
	values to ensure that you don't grow the clipped element.
	
        Reviewed by mjs

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidth):

2002-12-16  Trey Matteson  <trey@apple.com>

	3129175 - we're doing needless GETs when using b/f cache

	Turns out that an empty UserStyle was causing WebCore to reload the base URL
	of the page, since it tried to load the style "".

        Reviewed by Darin

        * khtml/khtml_part.cpp:
        (KHTMLPart::reparseConfiguration):  Of the UserStyle is empty, set it to an
	empty string instead of an empty URL.

2002-12-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3129008 - REGRESSION: Successive hot/cached runs of cvs-base PLT are slightly slower

	This was due to me reintroducing a leak of the document. Now fixed.
	
        * khtml/ecma/kjs_dom.cpp:
        (DOMDocument::~DOMDocument): forget self from cached DOM object table.
        (KJS::getDOMDocumentNode): Instead of storing the document in the
	marked per-document table, store it in the unmarked table, and as
	a property on the Window object.
        (KJS::getDOMNode): use getDocumentNode when appropriate.
        * khtml/ecma/kjs_dom.h:


2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3128728.  Ensure that list markers get placed into an
	existing line box if possible.  This patch also fixes RTL bullets
	and line height calculations involving image bullets that are the
	biggest thing on the line.  List markers also correctly move
	to avoid floats.

        Reviewed by mjs

        * khtml/rendering/render_list.cpp:
        (RenderListItem::setStyle):
        (getLineBoxParent):
        (RenderListItem::layout):
        (RenderListMarker::calcMinMaxWidth):

2002-12-16  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3128766 -- macconnection.com tries to add properties to the navigator DOM object, which fails

        * khtml/ecma/kjs_window.cpp: (Window::get): Set up properties named navigator and clientInformation
	the first time either is queried. These will hold a persistent shared object rather than making one
	every time it's asked for.

        * WebCore.pbproj/project.pbxproj: Let Electron undo Maciej's evil.

=== WebKit-37u2 ===

2002-12-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * WebCore.pbproj/project.pbxproj: Updated source version to 37u2.

2002-12-15  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed regression where clicked-on buttons were getting keyboard focus

        * kwq/KWQKHTMLPart.mm:
	(KWQKHTMLPart::khtmlMousePressEvent): Check clickCount here the way NSWindow does.
	See below for rationale.
	(KWQKHTMLPart::passWidgetMouseDownEventToWidget): I didn't read the code in
	[NSWindow sendEvent:] that I was stealing carefully enough. The old needsPanelToBecomeKey
	flag is used to decide whether something should really get first responder, and I need to
	do check that too. And while I was in here, did the same clickCount check that NSWindow
	does for good measure.

2002-12-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3128383 - DOM nodes should always use the same JS object
	
        * khtml/ecma/kjs_binding.h:
        * khtml/ecma/kjs_binding.cpp:
        (ScriptInterpreter::ScriptInterpreter): Set auto-delete to true on
	document dictionary.
        (ScriptInterpreter::getDOMObjectForDocument): New function - gets
	DOM object from per-document dictionary.
        (ScriptInterpreter::putDOMObjectForDocument): New function - put
	DOM object into per-document dictionary.
        (ScriptInterpreter::deleteDOMObjectsForDocument): Clear all
	objects from specific per-document dictionary.
        (ScriptInterpreter::mark): Mark per-document objects.
	(ScriptInterpreter::forgetDOMObjectsForDocument): Clear objects
	for this document from all interpreters.
        * khtml/ecma/kjs_dom.h:
        * khtml/ecma/kjs_dom.cpp:
        (KJS::getDOMNode): Use per-document rather than general DOM object
	dictionary.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::~DocumentImpl): Call forgetDOMObjectsForDocument.

2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3057974 and 3128713.  I needed to make frames check to
	see if their parentNode had a renderer to complete the FOUC
	fix.  Completing the FOUC fix finally solves 3057974.
	
        Reviewed by darin

        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::attach):

2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3109226, epinions page is mostly blank.  Add a hack
	to disallow > but only inside attribute values for which there
	is no corresponding attribute name.

	Also fix attribute values with no name so that the value is
	used as the name so that e.g., <option "selected"> works.
	
        Reviewed by darin

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::HTMLTokenizer):
        * khtml/html/htmltokenizer.h:

2002-12-15  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3127900 -- REGRESSION: text fields select all their text when clicked on with the mouse

        * kwq/KWQKHTMLPart.h: Add _firstResponderAtMouseDownTime.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::khtmlMousePressEvent): Don't call makeFirstResponder: if it's already set.
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Using _firstResponderAtMouseDownTime, catch the
	case where an NSTextField's editor was just created and became first responder. In those cases,
	pass the mouseDown: to the text field, not the newly created editor. Even though it shouldn't make
	a difference it does. Also don't makeFirstResponder: if it's already set.
        (KWQKHTMLPart::mouseDown): Set _firstResponderAtMouseDownTime.

        * kwq/KWQWidget.mm: (QWidget::setFocus): Don't call makeFirstResponder: if it's already set.

2002-12-15  David Hyatt  <hyatt@apple.com>

	Make sure framesets don't get built twice when FOUC delays
	their loading.
	
        Reviewed by gramps

        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameSetElementImpl::attach):
        * khtml/rendering/render_style.cpp:
        (RenderStyle::operator==):
        (RenderStyle::isStyleAvailable):
        * khtml/rendering/render_style.h:

2002-12-15  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed ==/= typo in QFontMetrics that caused a part of my recent speedup to not take effect
	- fixed 3128582 -- REGRESSION: Crash on planetquake.com

        * kwq/KWQFontMetrics.mm:
	(QFontMetricsPrivate::setFont): Fix a horrifying "== instead of =" mistake.
        (QFontMetrics::ascent): Give an ERROR message, don't crash, when this is called on a
	font metrics object that hasn't been updated to work for a particular font.
        (QFontMetrics::descent): Ditto.
        (QFontMetrics::lineSpacing): Ditto.
        (QFontMetrics::xHeight): Ditto.
        (QFontMetrics::width): Ditto.
        (QFontMetrics::floatWidth): Ditto.
        (QFontMetrics::floatCharacterWidths): Ditto.

        * khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach):
	Eliminated what was causing us to hit the above. BR elements need to respect display() == NONE.

	- fixed the fix for operator==; needs to work even if the pseudo type was
	  extracted already for one of the two, and not the other

        * khtml/css/cssparser.cpp:
        (CSSSelector::extractPseudoType): Only do work when the selector is Pseudo.
        (CSSSelector::operator==): Call pseudoType() instead of going right at _pseudoType.

2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3128402, missing content on voodooextreme.  Don't allow
	object/embed inside the head.
	
        Reviewed by cblu

        * khtml/html/dtd.cpp:

2002-12-15  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3127898 -- Crash going to altavista.com after visiting sony.com

        * khtml/ecma/kjs_window.cpp: (Window::get): Change lots of properties to return "undefined"
	rather than crashing when the view is NULL. I'm not sure that undefined is the perfect thing
	to return in this case, but it's better than crashing the program. We can refine later as needed.

	- fixed 3127157 -- REGRESSION: applet does not become first responder when clicked-on
	- fixed 3127934 -- Crash in KWQKHTMLPart::widgetWillReleaseView scrolling around

        * kwq/KWQKHTMLPart.h: Get rid of widgetWillReleaseView(). Add mouseDownViewIfStillGood().
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Call makeFirstResponder: in the same way that
	the NSWindow does before delivering a mouseDown: message. This oversight caused the applet problem.
        (findViewInSubviews): Added.
        (KWQKHTMLPart::mouseDownViewIfStillGood): Added. Gets _mouseDownView, but then checks that it's
	still a subview before returning it. A little inefficient, but the only way to do it given that
	there's no general way to find out that an NSView is being removed from your view hierarchy or deallocated.
	This fixes the crash in widgetWillReleaseView.
        (KWQKHTMLPart::khtmlMouseMoveEvent): Use mouseDownViewIfStillGood() instead of _mouseDownView directly.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Ditto.
        (KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
        * kwq/KWQWidget.mm:
        (QWidget::~QWidget): Remove call to widgetWillReleaseView().
        (QWidget::setView): Ditto.

2002-12-15  David Hyatt  <hyatt@apple.com>

	operator== on CSSSelectors needed to be updated to compare
	_pseudoTypes.  A nice subtle bug from the mega-patch. 
	
        Reviewed by mjs

        * khtml/css/cssparser.cpp:
        (CSSSelector::operator == ):

2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3128429, sans-serif font got broken.  Just a typo
	from darin's mega-patch.  
	
        Reviewed by mjs

        * khtml/css/cssstyleselector.cpp:

2002-12-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej and Dave.

	- optimizations that improve speed; total is 13.8% on cached cvs-base on my machine

        * khtml/css/css_valueimpl.h: Add isKonqBody() and genericFamilyType() to find out if
	a font is a standard one. This is much faster than doing string comparisons all the time.
        * khtml/css/css_valueimpl.cpp: (FontFamilyValueImpl::FontFamilyValueImpl):
	Check the font names against the standard ones on time when the FontFamilyValueImpl
	object is constructed rather than every time the stuff is matched.
        * khtml/css/cssparser.h: Add pseudoType() and extractPseudoType() to CSSSelector so we
	don't have to do string compares all the time.
        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseValue): Use QConstString in a way that's effective (with an
	object that has a long enough lifetime), or don't use it at all.
        (StyleBaseImpl::parseContent): Ditto.
        (StyleBaseImpl::preprocess): Preprocess into a buffer, usually on the stack, rather than
	using QString += QChar over and over again.
        (CSSSelector::extractPseudoType): Convert the value string into a type, and get rid of it.
	Saves memory because the string goes away. And doing it once is much faster than string
	comparing each time.
        * khtml/css/cssstyleselector.cpp:
	(cleanPath): Restructure to save one find() in the common case.
	(checkPseudoState): Restructure to avoid some DOMString creation/destruction in the case
	where the tag is not an <A>. Also use QConstString correctly.
	(CSSStyleSelector::checkOneSelector): Use the new pseudoType() instead of string compares.
	(CSSStyleSelector::applyRule): Use isKonqBody() and genericFamilyType() instead of string
	comparisons.

        * khtml/dom/dom_string.h: Make the destructor non-virtual. This was a big win, and a mistake
	the way it was before. Also make the DOMString constructor with no parameters inline.
        * khtml/dom/dom_string.cpp:
        (DOMString::string): Don't use QConstString here, since it does no good.
        (DOM::operator==): Rewrite to do things faster and avoid calling strlen.

        * khtml/html/html_objectimpl.h: Don't use QConstString in places where it does harm and no good.
        * khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::parseAttribute): Use QConstString properly.

        * khtml/html/htmltokenizer.cpp:
        (tagMatch): Added.
        (HTMLTokenizer::parseSpecial): Change tokenizing so it doesn't construct temporary strings (with
	QConstString) just to compare small substrings.

        * khtml/khtml_part.cpp: (KHTMLPart::write): Don't use a decoder object when source is all ASCII.

        * kwq/KWQColor.mm:
        (hex2int): Don't bother with uppercase hex since we always lowercase anyway.
        (QColor::setNamedColor): Use a new gperf-based table instead of an NSDictionary to look up colors.
        * kwq/KWQColorData.c: Added this autogenerated file.
        * kwq/KWQColorData.gperf: Added. Source file with list of colors and color values.
        * kwq/Makefile.am: Build KWQColorData.c from KWQColorData.gperf.
        * WebCore.pbproj/project.pbxproj: Added KWQColorData.gperf.

        * khtml/misc/helper.cpp: (khtml::setNamedColor): Don't call setNamedColor again with the lowercased
	color name, since our QColor::setNamedColor already has to lowercase the name (because it has to check
	all names before checking any hex values).

        * khtml/rendering/font.h: Don't initialize the QFontMetrics since in every case we end up changing
	the font later anyway. Also remove unused field.
        * khtml/rendering/font.cpp: (Font::update): Use the new QFontMetrics::setFont for speed.

        * khtml/rendering/render_object.cpp: (RenderObject::enclosingLayer): Change it so it doesn't get
	the layer twice. This function showed up on the sample so we know it's hot.

        * khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::containsOnlyWhitespace): Did a faster implementation
	that doesn't call QChar::direction() except for non-ASCII characters.

        * kwq/KWQFontMetrics.h: Add empty constructor for use in font.cpp. Add accessor and setter for the
	font too. Made baselineOffset() inline since it's trivial.
        * kwq/KWQFontMetrics.mm:
	(QFontMetricsPrivate::QFontMetricsPrivate): Don't make the renderer until we use it.
	(QFontMetricsPrivate::getRenderer): Make it here.
	(QFontMetricsPrivate::font): Added.
	(QFontMetricsPrivate::setFont): Added. Dumps the renderer if the font is different.
        (QFontMetrics::QFontMetrics): Added empty constructor.
        (QFontMetrics::setFont): Added.

        * kwq/KWQKURL.mm: (KURL::parse): Avoid function call overhead calling strncasecmp and strncmp.
	Also made the check for localhost case insensitive.

        * kwq/KWQString.h: Remove _isUnicodeInternal and _isAsciiInternal, since they are trivially
	computed, and it saves time to not have that extra field to manipulate. Removed private
	data() function since it's the same as *dataHandle and not really more clear. Made ascii()
	and unicode() simpler and inline. Also made latin1() and getCFString() inline. Renamed
	QStringData to KWQStringData.
        * kwq/KWQString.mm:
        (QStringData::QStringData): Remove initializers for the xxxInternal.
        (QStringData::initialize): Removed some unnecessary if statements, and made a slight improvement
	in the case of a 0-length string that comes with a pointer for Unicode (can't do it in the
        char * case because it's a feature that's used).
        (QString::makeSharedNull): No need to set _isUnicodeInternal.
        (QStringData::~QStringData): Use the new functions instead of the old bits.
        (QStringData::increaseAsciiSize): Grow faster when we get to larger sizes where the "good size"
	call doesn't have as much of an effect. Simplified by removing unneeded code.
        (QStringData::increaseUnicodeSize): Ditto.
        (QStringData::makeAscii): Update for removal of _isAsciiInternal.
        (QStringData::makeUnicode): Update for removal of _isUnicodeInternal.
        (QString::detachIfInternal): Add this new inline to speed things up for the common case where
	there's no detaching needed.
        (QString::at): Simplify, there were excess if branches here.
        (QString::toDouble): Use kjs_strtod and don't copy the string using QCString for additional speed.
        (QString::lower): Don't detach if the string is already all lowercase. Added a FIXME about the
	code that assumes all "ASCII" bytes are truly ASCII. This code blurs the distinction between Latin-1
	and ASCII in a way that will not work right for Latin-1 characters in an 8-byte character QString.
        (QString::detachInternal): Update for removal of _isUnicodeInternal.
        (QString::detach): Removed a special case for shared_null that was dead code since shared_null has
	the _isUnicodeValid flag set.
        (operator==): Rewrote the comparison with char * to avoid the costly call to strlen.

        * Makefile.am: Updated the rules here so the force clean timestamp works right.
        * force-clean-timestamp: Touched this since the header dependencies don't seem right
	for the DOMString constructor change, at least.
	* WebCore-tests.exp: Exported a symbol now needed by tests since QString does more inlining.
	* WebCore-combined.exp: Re-generated.

2002-12-14  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- slightly improved situation with 3124933 (abcnews.com leads to
	empty window with sheet complaining about javascript: URL); the
	popup window still comes up empty but it doesn't put up a sheet.
	
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::openURLRequest): Handled "javascript:"
	URLs here.

2002-12-14  David Hyatt  <hyatt@apple.com>

	Fix insidemacgames.com.  Reinstate rules I removed
	and fix other rules to be !important so that the
	td[align=right] rules won't affect child tables
	with align=center.
	
        Reviewed by gramps

        * khtml/css/html4.css:

2002-12-14  David Hyatt  <hyatt@apple.com>

	Fix for 3016385, menus on webreference.com don't show up.
	
	Fixes to make webreference.com menus show up.  This involved
	fixing layers to not clip positioned objects when overflow:hidden
	is set, fixing the stupid clip/sync layout hack for livepage
	so that it doesn't break webreference, and implementing 
	navigator.productSub (right now the date is set to
	Christmas 2002).
	
        Reviewed by gramps/maciej.

        * khtml/ecma/kjs_navigator.cpp:
        (Navigator::getValueProperty):
        * khtml/ecma/kjs_navigator.h:
        * khtml/ecma/kjs_navigator.lut.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::getOverflowClipRect):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):
        (RenderLayer::nodeAtPoint):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setLayouted):
        * khtml/rendering/render_object.h:

2002-12-14  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej

	Fix for this bug:

	Radar 3128159 (Netscape non-standard DOM event attribute "which" unsupported)

        * khtml/dom/dom2_events.cpp:
        (UIEvent::which): Added which() definition.
        * khtml/dom/dom2_events.h: Added declarations for which() functions in UIEvent.
        * khtml/ecma/kjs_events.cpp: 
        (DOMUIEvent::getValueProperty): Added which property.
        * khtml/ecma/kjs_events.h: Ditto.
        * khtml/ecma/kjs_events.lut.h: File regenerated.

2002-12-13  Richard Williamson   <rjw@apple.com>
    
        Fixed 3127310 and 3127920.

        Implemented findWordBoundary.  We now correctly detect word boundaries.
        This function makes use of carbon unicode utilities.
        
        With help from hyatt, made selection correctly account for render 
        continuations.  This fixes many of the 'unable to select' issues.
        
        Reviewed by trey and hyatt.

        * khtml/khtml_events.cpp:
        (khtml::MouseEvent::offset):
        * khtml/khtml_part.cpp:
        (findWordBoundary):
        (KHTMLPart::khtmlMousePressEvent):
        (KHTMLPart::khtmlMouseMoveEvent):
        * khtml/rendering/render_object.cpp:
        (RenderObject::checkSelectionPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::checkSelectionPoint):
        * khtml/rendering/render_text.h:

2002-12-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Don.

	- fixed build.
	
        * ForwardingHeaders/rendering/render_layer.h: Added.

2002-12-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Don.

	- fixed 3114737 - DHTML image content mispositioned on lexus.com
	
        * khtml/dom/dom2_events.cpp:
        (UIEvent::layerX): Added to support nonstandard Mozilla
	event.layerX property.
	(UIEvent::layerY): Added to support nonstandard Mozilla
	event.layerY property.
        * khtml/dom/dom2_events.h:
        * khtml/ecma/kjs_events.cpp:
        (DOMUIEvent::getValueProperty): Implemented layerX and layerY
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_events.lut.h:
        * khtml/xml/dom2_eventsimpl.cpp:
        (MouseEventImpl::MouseEventImpl): Added call to computeLayerPos.
        (MouseEventImpl::computeLayerPos): Compute layer position.
        (MouseEventImpl::layerX): Added.
        (MouseEventImpl::layerY): Added.
        (MouseEventImpl::initMouseEvent): Added call to computeLayerPos.
        * khtml/xml/dom2_eventsimpl.h:

2002-12-13  David Hyatt  <hyatt@apple.com>

	Fix for 314799, image at wired.com doesn't show up.  Block
	level replaced floating elements were being treated as though
	they didn't float.
	
        Reviewed by gramps

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layoutBlockChildren):

2002-12-13  David Hyatt  <hyatt@apple.com>

	Fix for 3098045.  

	Do not treat XHTML-style tags e.g., <br/> or <table/> as
	self-closing.  This is absolutely wrong, and it does not
	match the behavior of other browsers.  According to the HTML4
	spec for parsing, / is an erroneous character and should simply
	be dropped, so <table/> should be treated like <table>.

	Fixes for crashes on glazman's blog and on tantek's blog.  Both
	still mis-render, but at least they don't crash.
	
        Reviewed by gramps (and darin too)

        * khtml/html/htmltokenizer.cpp:
	* khtml/rendering/render_container.cpp:
	* khtml/rendering/render_style.cpp:
	
=== Alexander-37u1 ===

2002-12-13  David Hyatt  <hyatt@apple.com>

	Two fixes.  Bugs are 3121024, which had to do with handling
	escaped characters in the CSS content property, and 
	bug 3127375 (44854 in bugs.kde.org), which had to do with
	making sure table cells relayout properly when images load
	async.
	
        Reviewed by darin and john

        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseContent):
        (StyleBaseImpl::isHexadecimal):
        * khtml/css/cssparser.h:
        * khtml/rendering/bidi.cpp:
        (RenderFlow::layoutInlineChildren):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        * khtml/rendering/render_flow.h:

2002-12-13  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- moved KWQFontFamily and KWQPageState to new homes

        * kwq/KWQFontFamily.h: Added.
        * kwq/KWQFontFamily.mm: Added.
        * kwq/KWQPageState.h: Added.
        * kwq/KWQPageState.mm: Added.
        * WebCore.pbproj/project.pbxproj: Added new source files.

        * kwq/KWQFont.h: Removed KWQFontFamily.
        * kwq/KWQFont.mm:  Removed KWQFontFamily.
        * kwq/WebCoreBridge.mm: Removed KWQPageState.

2002-12-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3083814 - dhtml at www.bayarea.com doesn't hide on some mouse movements
	
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_events.cpp:
        (DOMUIEvent::getValueProperty): Implemented pageX and pageY properties.
        * khtml/ecma/kjs_events.lut.h: Regenerated.
        * khtml/dom/dom2_events.h:
        * khtml/dom/dom2_events.cpp:
        (UIEvent::pageX): Get x coordinate if a mouse event.
        (UIEvent::pageY): Get y coordinate if a mouse event.

2002-12-13  Richard Williamson   <rjw@apple.com>

        Fixed 3127225.  Set WebCore object cache size when first bridge is created.

        Reviewed by gramps.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge init]):

2002-12-13  Darin Adler  <darin@apple.com>

        Reviewed by John.

	Overall speedup on cvs-base is about 5%.

	- reduce QString use in the tokenizer and tighten up QString implementation for a speedup
	- fix up the QFontFamily implementation, using new QString features too, for a speedup

        * khtml/html/htmltokenizer.h: Take const QString & instead of QString to avoid an extra copy.
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::begin): Use QString::null instead of "" for QString objects; faster.
        (HTMLTokenizer::scriptHandler): In APPLE_CHANGES, use new prepend that avoids the need to
	create a temporary QString. Use QString::null instead of QString() for a null string, and
	also made other small fixes to avoid temporary QStrings.
	(HTMLTokenizer::setSrc): Take const QString & instead of QString to avoid an extra copy.

        * kwq/KWQFont.h: Rename QFontFamily to KWQFontFamily. Make family() inline, add inline
	familyIsEmpty(). Change KWQFontFamily to store both the QString for the family and the
	NSString instead of only the NSString to avoid constant conversions back and forth.
	Remove type cases in CREATE_FAMILY_ARRAY that could result in copying the font object.
        * kwq/KWQFont.mm:
        (KWQFontFamily::KWQFontFamily): Fix bug where a copied family object would have a random
	ref count instead of a ref count of 0. Also update for NSString change.
        (KWQFontFamily::operator=): Use the ref before deref algorithm instead of the check for
	self-assignment.
        (KWQFontFamily::getNSFamily): Compute the NSString for the family name here. To avoid
	making an NSString every time, use a CFDictionary with QString as a key and NSString as
	a value instead of using an NSSet.
        (KWQFontFamily::setFamily): Invalidate the NSString family when the QString family is
	changed. Moved the code to make things unique to getNSFamily.
        (KWQFontFamily::operator==): Call getNSFamily rather than

        * kwq/KWQString.h: Added a prepend and insert overload that take a QChar pointer and length, for
	use in the tokenizer, and a hash function, for use in CFDictionary. Also added a global set of
	CFDictionaryKeyCallBacks.
        * kwq/KWQString.mm:
        (QString::prepend): New overload calls new insert overload.
        (QString::insert): Old insert slightly tightened by calling detach() only after the early exit
	and removing an extra detach from a function that already does forceUnicode. Added the new insert
	that takes a QChar * and a length.
        (operator==): Rewrite this so that it is efficient and doesn't involve creating a QString temporary
	or doing a function call.
        (QString::hash): Wrote this. Used the same hash algorithm I did in my recent KJS work.
        (retainQString): Added. For use in CFDictionaryKey callback.
        (releaseQString): Added. For use in CFDictionaryKey callback.
        (describeQString): Added. For use in CFDictionaryKey callback.
        (equalQString): Added. For use in CFDictionaryKey callback.
        (hashQString): Added. For use in CFDictionaryKey callback.

        * khtml/rendering/font.h: Change name to KWQFontFamily.
        * khtml/rendering/font.cpp: (Font::update): Call familyIsEmpty() instead of family().isEmpty()
	to avoid making and destroying a QString every time. Also put this batch of KWQFontFamily-specific
	changes inside #if APPLE_CHANGES. Much to my dismay, we have others elsewhere that aren't ifdef'd.

        * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): Change name to KWQFontFamily.
	Clearly this code needs some #if APPLE_CHANGES, and changing the class name helps make that clear.

	- change KHTMLSettings so using it doesn't require copying QStrings for a speedup

        * kwq/KWQKHTMLSettings.h: Made all the functions static members to avoid the unnecessary
	overhead of passing a this pointer. Added lots of setXXX functions for use by the WebCoreSettings
	code that gets called by WebKit when settings are changed. Return objects by reference because we
	can and it avoids copying QString objects.
        * kwq/KWQKHTMLSettings.mm: Changed all the functions in here to return the same global object
	each time, and made the set functions update those globals.
        * kwq/WebCoreSettings.mm: All the setters now call through to KHTMLSettings set functions.

        - fixed 3126513 -- crash in KWQKHTMLPart::clearTimers() deallocating KWQPageState
	- did some cleanup in the bridge and the part; part of the process of moving real work out of the bridge

        * kwq/KWQKHTMLPart.h: Rearrange things to be a little more logical. Mark isFrameSet() const.
	added an attributedString function here so it's not inside WebCoreBridge. Added an overload
	of clearTimers that takes a view parameter.
        * kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): Mark this const.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::clearTimers): Add the overload that takes the view parameter.
        (KWQKHTMLPart::attributedString): Moved this code in here from the bridge.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge selectedAttributedString]): Call the attributedString function in its new home in
	KWQKHTMLPart.
        (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto.
        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]):
	Take a const KURL & instead of a KURL to avoid unnecessary copying.
        (-[KWQPageState dealloc]): Call the new clearTimers that takes a view parameter. This should fix the
	crash in autorelease pool deallocation mentioned above.

2002-12-13  David Hyatt  <hyatt@apple.com>

	Fix for 3121865, content missing at disney.com.  Make
	sure blocks track width overflow as well as height
	overflow and ensure that a layer's dimensions expand
	to encompass both width and height overflow.

	Also fixes a bug with line breaking that allowed unbreakable
	words to actually be broken up when they were the only word
	on a line.  This is wrong and differs from all other
	browsers, so the patch in bidi.cpp fixes us to match
	other browsers.  (This was required to fix the above bug.)
	
        Reviewed by mjs.

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::RenderFlow):
        (RenderFlow::layout):
        (RenderFlow::layoutBlockChildren):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):
        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_table.h:

2002-12-12  Richard Williamson   <rjw@apple.com>

        Fixed 3116584.  Made letter-spacing, word-spacing, and text-decoration play
        well together.
        Reviewed by hyatt.

        Changes made with trey to enable to release of page cache from the
        "Empty Cache" menu item in Alex.
        Reviewed by trey.
        
        * khtml/rendering/font.cpp:
        (Font::drawLineForText):
        (Font::drawText):
        * khtml/rendering/font.h:
        * khtml/rendering/render_text.cpp:
        (TextSlave::paintDecoration):
        (RenderText::paintObject):
        * khtml/rendering/render_text.h:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::drawLineForText):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dealloc]):
        (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
        (-[KWQPageState invalidate]):
        (-[KWQPageState dealloc]):
        * kwq/WebCoreTextRenderer.h:

2002-12-12  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej and Darin

	Final fix for this bug:

	Radar 3062858 (REGRESSION: failed login at www.usaa.com doesn't return error text)

	We were down to a case where submitting the login form with the return key
	failed since we did not implement either non-standard keyCode (IE-style) or
	which (Netscape-style) UI event extension for getting the value of a key
	press. The form submission code depended on sensing the value of the
	key press by checking one of these properties.
	
	Since the "which" property also can be used for mouse events, and fixing
	this bug could be done by implementing either keyCode or which, I chose
	to implement keyCode only.

        * khtml/dom/dom2_events.cpp: Added keyCode function definition.
        * khtml/dom/dom2_events.h: Added keyCode function declaration.
        * khtml/ecma/kjs_events.cpp:
        (DOMUIEvent::getValueProperty): Added new KeyCode attribute.
        * khtml/ecma/kjs_events.h: New generated file.
        * khtml/ecma/kjs_events.lut.h: Ditto.
        * khtml/xml/dom2_eventsimpl.cpp: 
        (KeyEventImpl::KeyEventImpl): Fixed a bug in khtml that prevented the        
        m_keyVal field on KeyEventImpl from ever being set correctly. 
        I guess I am the first person ever to care about that value. :-)

=== Alexander-36 ===

2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3126042 -- Failure to send onkeypress event on key down causes forms to submit incorrectly

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent): Fixed the code to send the second event with repeat
	set equal to true. Before it was constructing the event but never sending it because result was true.
	Also fixed a problem where it was considering sending a second mouse up event. What we're doing here
	is a bit of a hack and probably should be fixed -- it seems that the behavior in dispatchKeyEvent where
	it sends only a down and not a press for the a non-autorepeat event is a KHTML bug that we should fix
	instead of work around eventually.
        
        - fix to something that made this harder to debug

        * khtml/xml/dom2_eventsimpl.cpp: (KeyEventImpl::KeyEventImpl): Logging the type was showing the wrong
	type, and I narrowed it down to this code here. Changing m_id after the fact doesn't change the type
	string, so you need to compute the correct ID and pass it to the constructor.

2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3125886 -- Failure to set document onkeypress handler causes return key to submit forms incorrectly

	The handler was getting ignored because the property setting code never got to the DOMNode level.

        * khtml/ecma/kjs_dom.cpp: (DOMDocument::tryPut): Pass correct parent class, DOMNode, instead
	of DOMObject. By passing DOMObject, we skipped all the properties inherited from DOMNode,
	including onkeypress.

2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Trey and Ken.

	- fixed 3125613 -- REGRESSION: resizing frames after clicking on scroll bar doesn't work right
        
        The problem was that the mouse dragged events were going to the scroll bar because the new click
        on the frame resizer didn't fall into the code path that sets _mouseDownView.

        * kwq/KWQKHTMLPart.h: Add override of khtmlMouseMoveEvent.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Don't set _mouseDownView. This is now handled
	at the higher level when the mouseDown comes in.
        (KWQKHTMLPart::khtmlMouseMoveEvent): Added. Pass along mouseDragged: events. I didn't have this
	before because I don't want or need to pass mouseMoved: events along, but the KHTML mouse move
	event corresponds to both AppKit mouseDragged and mouseMoved.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Don't clear _mouseDownView. This is now handled at the
	higher level when the mouseUp comes in.
        (KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
        (KWQKHTMLPart::mouseDown): Set _mouseDownView to nil; it will be set by passWidgetMouseDownEventToWidget
	if we end up passing the event down. This is the change that actually fixes the bug mentioned above.
        (KWQKHTMLPart::mouseUp): Set _mouseDownView to nil after handling the mouseUp. It's OK if we don't
	clear this out in cases where we don't get a mouseUp event -- we'll get a mouseDown later -- but it's
	still probably a good idea to clear it when we know the mouse is no longer down.

	- used update-kwq-assert to update the code that's a shared copy of WebFoundation code

        * kwq/KWQAssertions.m: (vprintf_stderr_objc): Got the UTF-8 fix I did a while back.

2002-12-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * force-js-clean-timestamp: Update for JavaScriptCore changes.

2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3125504 -- REGRESSION: Selection not working correctly for text area on http://glish.com/css/7.asp

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMousePressEvent): Call makeFirstResponder here explicitly,
	since we are disabling the makeFirstResponder that normally happens during window event dispatching
	in WebKit.

        * kwq/KWQScrollView.h: Define getDocumentView().
        * kwq/KWQScrollView.mm: Use getDocumentView() everywhere.
        (QScrollView::getDocumentView): Define it here.

2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Maciej and Richard.

	- fixed 3125497 -- REGRESSION: Infinite recursion with mouseUp: events

	The problem was that events could end up back at the same part due to the responder chain.

        * kwq/KWQKHTMLPart.h: Added mouseDown, mouseDragged, mouseUp, mouseMoved, buttonForCurrentEvent,
	and stateForCurrentEvent. Remove setCurrentEvent and currentEvent. Renamed handleMouseDownEventForWidget
	to passWidgetMouseDownEventToWidget. John and I had agreed to this name change before the last commit,
	but I forgot.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): Initialize _sendingEventToSubview to false. No need to initialize
	_mouseDownWasInSubframe at all since it's only looked at when _mouseDownView is non-nil.
        (KWQKHTMLPart::keyEvent): Save and restore _currentEvent instead of setting to nil.
	Use stateForCurrentEvent instead of stateForEvent:.
        (KWQKHTMLPart::khtmlMousePressEvent): Name change.
        (KWQKHTMLPart::khtmlMouseDoubleClickEvent): Name change.
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Name change. Set _sendingEventToSubview when
        sending event to subview.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Name change. Set _sendingEventToSubview when sending
	event to subview.
        (KWQKHTMLPart::passSubframeEventToSubframe): Name change. Set _sendingEventToSubview when
	sending event to subview.
        (KWQKHTMLPart::buttonForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
        (KWQKHTMLPart::stateForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
        (KWQKHTMLPart::mouseDown): Added. Similar to code I moved here from WebCoreBridge, except returns
	and does nothing if _sendingEventToSubview is set.
        (KWQKHTMLPart::mouseDragged): Ditto.
        (KWQKHTMLPart::mouseUp): Ditto.
        (KWQKHTMLPart::mouseMoved): Added. Similar to code I moved here from WebCoreBridge.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge mouseDown:]): Just call _part->mouseDown().
        (-[WebCoreBridge mouseDragged:]): Just call _part->mouseDragged().
        (-[WebCoreBridge mouseUp:]): Just call _part->mouseUp().
        (-[WebCoreBridge mouseMoved:]): Just call _part->mouseMoved().

        * kwq/WebCoreBridgePrivate.h: Removed.
        * WebCore.pbproj/project.pbxproj: Removed WebCoreBridgePrivate.h.

2002-12-12  Richard Williamson   <rjw@apple.com>

        Fixed 3125583.  Don't redraw view under resize bar
        on mouseup.
        
        Reviewed by gramps.

        * khtml/rendering/render_frames.cpp:
        (RenderFrameSet::userResize):

2002-12-11  David Hyatt  <hyatt@apple.com>

	Fix hang on monkeyvoodoo.net and on skramkoob.com.  The bugs
	are 3105714 and 3045965.  Also fix margin collapsing churn
	on thestar by not laying out a second time when collapsing
	margins make you move unless you contain floats.
	
        Reviewed by: gramps

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):
	* khtml/rendering/render_flow.cpp:
	(RenderFlow::layoutBlockChildren);

2002-12-11  Richard Williamson   <rjw@apple.com>

        Fixed 3124121, 3124716 (and other dupes).  Regressions related to b/f crash.
        
        Reviewed by hyatt.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURLFromPageCache):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dealloc]):
        (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):

2002-12-11  Darin Adler  <darin@apple.com>

        Reviewed by Richard.

	- fixed 3124263 -- REGRESSION: Crash running development build of PLT

        * kwq/KWQWidget.mm:
        (QWidget::~QWidget): Don't worry about the outer view here, since we can never hit one of those.
	Just pass the view to KWQKHTMLPart::widgetWillReleaseView.
        (QWidget::getOuterView): Re-add the assertion I had removed.

	- fixed 3124837 -- Crash trying to handle weird javascript URL in page address field

        * kwq/KWQKURL.mm: (KURL::decode_string): Made this function return the URL still encoded
	rather than a null string (actually, crashing) when CFURLCreateStringByReplacingPercentEscapes
	rejects the passed-in string. Also updated the FIXME.
        (appendEscapingBadChars): Fixed problem with high-bit-set characters.
        * kwq/KWQString.mm: (QString::setBufferFromCFString): Made this tolerant of NULL.

2002-12-11  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed handling of mouse events so I could turn the mechanism on all the way
	- fixed anomalies in the red-painting-for-null-view-detection
	- fixed 3123105 -- REGRESSION: Crash in KHTMLView::unscheduleRelayout on exit
	- fixed 3124047 -- REGRESSION: crash in KWQKHTMLPart::handleMouseDownEventForWidget at nwa.com

        * kwq/KWQKHTMLPart.h: Add setCurrentEvent()/currentEvent()/_currentEvent back, because we can
	end up doing a lot of work and processing a lot of events before we get around to handling the
	current event, so [NSApp currentEvent] won't cut it. Also add clearTimers, passSubframeEventToSubframe,
	an overload for handleMouseDownEventForWidget, and _mouseDownWasInSubframe boolean.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::submitForm): Use _currentEvent.
        (KWQKHTMLPart::urlSelected): Use _currentEvent.
        (KWQKHTMLPart::paint): Fixed red-drawing-for-debug code by using KWQPainter instead of going
	directly to the AppKit level.
        (KWQKHTMLPart::keyEvent): Moved the check for null node up a bit, and set _currentEvent.
        (KWQKHTMLPart::handleMouseDownEventForWidget): Break into two pieces, so we can share the
	code with the new passSubframeEventToSubframe. Set _mouseDownWasInSubframe to false
	when setting _mouseDownView. Use getView() instead of getOuterView() since we really don't
	care about the WebView after all. Use _currentEvent. Add a check for nodes that lack a renderer
	to fix the crash at nwa.com above.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Use _currentEvent.
        (KWQKHTMLPart::clearTimers): Added. Checks for null view, which fixes the crash on exit above.
        (KWQKHTMLPart::passSubframeEventToSubframe): Added. Checks for the categories of events that we
	can pass to subframes, which are mouse down, up, and dragged events, and passes them along.
	This is the main fix that makes subframes work properly.

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMousePressEvent): Add call to the new passSubframeEventToSubframe.
        (KHTMLView::viewportMouseDoubleClickEvent): Ditto.
        (KHTMLView::viewportMouseMoveEvent): Ditto.
        (KHTMLView::viewportMouseReleaseEvent): Ditto.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge saveDocumentToPageCache]): Call clearTimers on the part now, instead of the document.
        (-[WebCoreBridge mouseUp:]): Call setCurrentEvent.
        (-[WebCoreBridge mouseDown:]): Ditto.
        (-[WebCoreBridge mouseMoved:]): Ditto.
        (-[WebCoreBridge mouseDragged:]): Ditto.
        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]): Call clearTimers on the
	part now, instead of the document.

	- other changes

        * khtml/ecma/kjs_window.lut.h: Let this be regenerated. I think I accidentally checked
	in an obsolete version of this earlier.

        * khtml/html/html_documentimpl.h: Remove clearTimers(). We don't need it here in APPLE_CHANGES.
        * khtml/html/html_documentimpl.cpp: Ditto.

        * khtml/khtmlpart_p.h: Removed unneeded APPLE_CHANGES. We don't use m_frameNameId any more, nor
	do we need m_savingPageState or m_restoringPageState.
        * khtml/khtml_part.cpp: (KHTMLPart::clear): Removed unneeded APPLE_CHANGES, now that we don't
	use m_frameNameId any more.
        
        * kwq/KWQWidget.mm: (KWQWidget::getOuterView): Tolerate nil for view here, so we can use this from
        the QWidget destructor.

2002-12-11  Darin Adler  <darin@apple.com>

        Rolled out changes I accidentally checked in last night.

2002-12-10  John Sullivan  <sullivan@apple.com>

	Fixed more "Alexander"s that were lurking in places I forgot 
	to look before.

        Reviewed by Darin

        * Makefile.am:
	"rm -rf $(SYMROOTS)/Safari.app/Frameworks/WebCore.framework"

2002-12-10  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Don.

	- really fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
	http://www.pixar.com/howwedoit/

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): Call Cache::init before
	KHTMLPart::init so we have a loader to connect the signals to.

2002-12-10  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
	http://www.pixar.com/howwedoit/

        * khtml/khtml_part.cpp:
        (KHTMLPart::KHTMLPart): Don't call KHTMLPart::init at all...
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): Call it here instead so that signal
	connections happen properly.

2002-12-10  David Hyatt  <hyatt@apple.com>

	Fix for 3116996.  My hack to make selects ignore fixed CSS
	widths that are smaller than their intrinsic width was not
	good.  Remove the hack.
	
        Reviewed by darin

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcReplacedWidth):

2002-12-10  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3108912 -- onclick handlers not supported on form elements

	We now pass the events back to the NSView here in WebCore; they pass through all the
	machinery in the DOM before getting sent on.

        * kwq/KWQKHTMLPart.h: Add widgetWillReleaseView and handleMouseDownEventForWidget functions,
	overrides for khtmlMousePressEvent, khtmlMouseDoubleClickEvent, khtmlMouseReleaseEvent, and
	a new _mouseDownView field.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): Initialize _mouseDownView to nil.
        (KWQKHTMLPart::khtmlMousePressEvent): Call handleMouseDownEventForWidget, but if it returns
	false call through to the base class function.
        (KWQKHTMLPart::khtmlMouseDoubleClickEvent): Ditto.
        (KWQKHTMLPart::handleMouseDownEventForWidget): Do a hit test to find out which view to send
	the mouse down event to, and then send it.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Send the mouse up event to the view we sent a mouse
	down event to, or call through to the base class otherwise.
        (KWQKHTMLPart::widgetWillReleaseView): Clear out the _mouseDownView field if the view is
	being released by the QWidget that owns it.

        * kwq/KWQWidget.mm:
        (QWidget::~QWidget): Call KWQKHTMLPart::widgetWillReleaseView.
        (QWidget::setView): Call KWQKHTMLPart::widgetWillReleaseView on the old view.

2002-12-09  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        * WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.

2002-12-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 3117734 - fail at document.releaseEvents in js at rollingstone.com
	
        * khtml/ecma/kjs_html.cpp:
	(KJS::HTMLDocFunction::tryCall): Added no-op implementations of
	captureEvents and releaseEvents.
        (KJS::HTMLDocument::tryGet):
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_window.cpp:
        (Window::get, WindowFunc::tryCall): Added no-op implementation of
	releaseEvents.
	* khtml/ecma/kjs_window.h:
        * khtml/ecma/kjs_html.lut.h: Regenerated.
        * khtml/ecma/kjs_window.lut.h: Regenerated.

2002-12-09  David Hyatt  <hyatt@apple.com>

	Fix for the CSS test suite link.  Need to make sure inlines
	that are obscured by blocks are properly considered to be
	above the block background.
	
        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):

2002-12-09  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- made KWQKHTMLPart a subclass of KHTMLPart so we can override virtual functions

        * khtml/khtml_part.h: Get rid of kwq pointer.
        * khtml/khtml_part.cpp:
        (KHTMLPart::init): No need to make a KWQKHTMLPart any more.
        (KHTMLPart::~KHTMLPart): No need to delete a KWQKHTMLPart any more.
        (KHTMLPart::closeURL): KWQKHTMLPart does saveDocumentState in an override now.
        (KHTMLPart::begin): KWQ() instead of ->kwq.
        (KHTMLPart::checkCompleted): KWQ() instead of ->kwq, and ifdef out some unneeded code.
        (KHTMLPart::urlSelected): KWQ() instead of ->kwq.
        (KHTMLPart::requestFrameName): KWQ() instead of ->kwq.
        (KHTMLPart::processObjectRequest): Just call openURL, since we are now KWQKHTMLPart.
        (KHTMLPart::submitForm): KWQ() instead of ->kwq.
        (KHTMLPart::popupMenu): Did a bit more ifdef'int out here.

        * kwq/KWQKHTMLPart.h: Include "khtml_part.h" and remove includes we don't need any more.
	Inherit from KHTMLPart instead of QObject. Remove KHTMLPart parameter from constructor.
	Override openURL and closeURL. Remove part and d pointers. Add KWQ() inline to avoid casting.
        * kwq/KWQKHTMLPart.mm:
        (KHTMLPart::completed): KWQ() instead of ->kwq.
        (KHTMLPart::openURL): Never reached now, since we override.
        (KHTMLPart::setStatusBarText): KWQ() instead of ->kwq.
        (KHTMLPart::started): KWQ() instead of ->kwq.
        (KWQKHTMLPart::KWQKHTMLPart): No need to deal with separate part.
        (KWQKHTMLPart::bridgeForFrameName): KWQ() instead of ->kwq.
        (KWQKHTMLPart::openURL): Add bool return value so we can override the existing openURL.
        (KWQKHTMLPart::slotData): Remove unneeded part->.
        (KWQKHTMLPart::setView): Remove unneeded part->.
        (KWQKHTMLPart::document): Remove unneeded part->.
        (KWQKHTMLPart::renderer): Remove unneeded part->.
        (KWQKHTMLPart::userAgent): Remove unneeded part->.
        (KWQKHTMLPart::nextKeyViewInFrame): KWQ() instead of ->kwq.
        (KWQKHTMLPart::nextKeyViewInFrameHierarchy): KWQ() instead of ->kwq.
        (KWQKHTMLPart::canCachePage): Remove unneeded part->.
        (KWQKHTMLPart::saveWindowProperties): Use this instead of part.
        (KWQKHTMLPart::saveLocationProperties): Use this instead of part.
        (KWQKHTMLPart::restoreWindowProperties): Use this instead of part.
        (KWQKHTMLPart::restoreLocationProperties): Use this instead of part.
        (KWQKHTMLPart::openURLFromPageCache): Remove unneeded part->.
        (KWQKHTMLPart::partForNode): KWQ() instead of ->kwq.
        (KWQKHTMLPart::updatePolicyBaseURL): Remove unneeded part->.
        (KWQKHTMLPart::setPolicyBaseURL): Remove unneeded part->.
        (KWQKHTMLPart::createDummyDocument): Use this instead of part.
        (KWQKHTMLPart::scrollToAnchor): Remove unneeded part->.
        (KWQKHTMLPart::closeURL): Added. Calls saveDocumentState().

        * kwq/WebCoreBridge.h: Use KWQKHTMLPart instead of KHTMLPart.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge init]): Make a KWQKHTMLPart.
	Use _part instead of _part->kwq in the rest of the file.

        * kwq/KWQSignal.mm: (KWQSignal::disconnect): Add the names of a few signals that are
	disconnected after the KWQKHTMLPart part of the KHTMLPart is destroyed, to avoid noise.

        * khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty): KWQ() instead of ->kwq.
        * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::initScript): KWQ() instead of ->kwq.
        * khtml/ecma/kjs_window.cpp:
        (Window::scheduleClose): KWQ() instead of ->kwq.
        (WindowFunc::tryCall): KWQ() instead of ->kwq.
        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setTitle): KWQ() instead of ->kwq.
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::openURLRequest): KWQ() instead of ->kwq.
        (KHTMLPartBrowserExtension::createNewWindow): KWQ() instead of ->kwq.
        (KHTMLPartBrowserExtension::setIconURL): KWQ() instead of ->kwq.
        (KHTMLPartBrowserExtension::setTypedIconURL): KWQ() instead of ->kwq.
        * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::showApplet): KWQ() instead of ->kwq.
        * kwq/KWQLoader.mm:
        (KWQServeRequest): Cast to KWQKHTMLPart instead of casting to KHTMLPart and doing ->kwq.
        (KWQCheckIfReloading): Ditto.
        (KWQCheckCacheObjectStatus): Ditto.

        * WebCore.pbproj/project.pbxproj: Let Electron punish the wicked.

2002-12-09  Richard Williamson   <rjw@apple.com>

        Many changes for b/f list.
        1.  Always attempt to cache snap back items.
        2.  Lazily release resources from page cache.  This garners gains on the PLT (and presumably iBench) tests, both for uncached.
        3.  Set the page cache size to 4 (+ snap back items).  After releasing resources we hover around 28MB footprint.  Closing windows releases all resources.
        4.  Turn on the back/forward cache by default.  The menu item still allows you to toggle b/f on and off.  Useful when conducting speed comparison in the PLT.
        5.  Addition of lazy update to PLT memory statistics to show footprint after lazy release of page cache resources.
        6.  Delayed to leak detector to account for lazy release of resources.
        7.  A change when saving a page to back/forward cache to clear and restore the documents root renderer.  Without this fix pages would appear to 'flicker' more when content arrived.
        8.  A change to ensure a layout when restoring a page from the b/f cache.  Without this fix scrollbars wouldn't appear correctly.
        9.  A change to ensure that khtmlview layout and paint timers are unscheduled when a page is placed in the b/f cache.
        10.  A fix to decouple of khtmlview from it's part when placed in the b/f cache.  This fixed a crash caused by inappropriate deference of the part when a page cache item was released.
        11.  A comment in KHTMLPageCache.h explaining the that our page cache is not the same as the khtml page cache.  (Their cache just cached the html source.)
        12.  Reapply styles when loading page from cache.  This ensures that visited link get the appropriate style.

        Reviewed by kocienda.

        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::clearTimers):
        * khtml/html/html_documentimpl.h:
        * khtml/khtmlview.cpp:
        (KHTMLView::clearPart):
        (KHTMLView::timerEvent):
        * khtml/khtmlview.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::restoreRenderer):
        (DocumentImpl::detach):
        * khtml/xml/dom_docimpl.h:
        * kwq/KWQKHTMLPageCache.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
        (-[WebCoreBridge saveDocumentToPageCache]):
        (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
        (-[KWQPageState dealloc]):
        (-[KWQPageState KJS::]):
        (-[KWQPageState khtml::]):

2002-12-08  Trey Matteson  <trey@apple.com>

	Fixed 3115903 - exchangehomes.com sometimes has form state poorly restored

	KHTML is much smarter about restoring form state now, taking into account element names and
	types instead of blindly blasting data by simple element ordering.  We encode the name
	and type at the front of the "state" strings that previously just held the value of the
	element.	

	QString::endsWith() was just plain wrong.  Looks like it had some copied code, but was
	never really implemented.

        Reviewed by: Darin Adler

        * WebCore.pbproj/project.pbxproj:  PB is hellbent on adding "shouldUseHeadermap = 0;"
        * khtml/html/html_formimpl.cpp:
        (encodedElementName):  Utility func to encode an element name, escaping amp and lt
        (HTMLGenericFormElementImpl::state):  Build the prefix of an element's state string,
	e.g. ELEMENT_NAME&ELEMENT_TYPE&
        (HTMLGenericFormElementImpl::findMatchingState):  Find a matching piece of state out of
	the list of state strings that were previously saved.
        (HTMLFieldSetElementImpl::type):  Return our element type.
        (HTMLInputElementImpl::state):  Call super as part of building state string.
        (HTMLInputElementImpl::restoreState):  Use findMatchingState.
        (HTMLLegendElementImpl::type):  Return our element type.
        (HTMLSelectElementImpl::state):  Call super as part of building state string.
        (HTMLSelectElementImpl::restoreState):  Use findMatchingState.
        (HTMLKeygenElementImpl::type):  Return our element type.
        (HTMLOptGroupElementImpl::type):  Return our element type.
        (HTMLOptionElementImpl::type):  Return our element type.
        (HTMLTextAreaElementImpl::state):  Call super as part of building state string.
        (HTMLTextAreaElementImpl::restoreState):  Use findMatchingState.
        * khtml/html/html_formimpl.h:  type() is moved up to HTMLGenericFormElementImpl
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):  Pass list of states to restoreState.
        (KHTMLParser::popOneBlock):  Pass list of states to restoreState.
        * khtml/xml/dom_docimpl.h:  Add method to return the whole list of form states.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::restoreState):    Nodes receive the whole list of form states to restore from,
	not just a single state that has already been chosen.
        * khtml/xml/dom_nodeimpl.h:
        * kwq/KWQString.mm:
        (QString::endsWith):  Walk the search string correctly.

2002-12-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3103954 - preferences not displayed properly at excite.com
	
        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::value): If a radio or checkbox input has a
	value, return that rather than something based on the checked
	state. Only fall back on the checked state if there is no value.

2002-12-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3103036 - REGRESSION: scripts dropped from DOM tree;
	javascript text rendered to screen

	The problem here is that we don't allow SCRIPT inside MAP, so the
	script tag gets thrown away in the DOM and the text is added
	directly to the MAP. I can't see a good reason not to allow SCRIPT
	here, so I think the best thing to do is relax the DTD.
	
        * khtml/html/dtd.cpp:
        (DOM::checkChild): Relax the DTD to allow SCRIPT inside MAP.

2002-12-08  David Hyatt  <hyatt@apple.com>

	Fix for 3007276, styles do not cascade properly through
	tables.  The font was being reset to the default font
	(konq_default) when it needed to be reset to the body's font.
	I added a new font family value called konq_body and the 
	style system resolves that value to be the body's font family list.
	
        Reviewed by: gramps and mjs

        * khtml/css/cssstyleselector.cpp:
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::attach):

2002-12-08  David Hyatt  <hyatt@apple.com>

	Fix for 3121814.  Forms inside table elements (tbody and table
	etc.) can be inline.  Just remove the assert and replace it
	with a bailout.
	
	Fix for 3036479.  Tables with specified heights but cells
	with no height (or no cells at all) were not honoring
	the specified height.
	
        Reviewed by: gramps

        * khtml/rendering/render_table.cpp:
        (RenderTable::RenderTable):
        (RenderTable::startRow):
        (RenderTable::layoutRows):
        (RenderTable::paint):
        (RenderTable::recalcCells):

2002-12-08  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 2981252 - JavaScript inside <!-- --> comments inside <select> is not executed

	This problem is caused by the hack to turn all whitespace into
	spaces inside <select>, so that it's collapsed in the DOM. But
	this is especially bad for scripts inside select tags, so I
	changed the select special case to not apply inside scripts.

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::addPending): 
        (HTMLTokenizer::write):

2002-12-08  Darin Adler  <darin@apple.com>

        Reviewed by Don and Dave.

	- fixed 3115845 -- bad-pointer crash destroying DOM tree reproducible at a particular site

	All hail libgmalloc, without which this would just be another bug I can't reproduce!

	This memory trasher bug was caused bug calling setChildrenLoaded after casting a node to
	HTMLObjectElementImpl, when the node wasn't always an object element. It turns out that this
        fix was made obsolete a while back when I changed close on renderers to be delivered even for
        cases where the renderer is not created yet at close time.

        * khtml/html/htmlparser.cpp: (KHTMLParser::processCloseTag): Remove the special case for
	</object>. Now that this is fixed another way we don't need this at all.

        * khtml/html/html_objectimpl.h: Remove setChildrenLoaded and m_childrenLoaded.
        * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::HTMLObjectElementImpl):
	Remove code that sets m_childrenLoaded to false.
        (HTMLObjectElementImpl::attach): Remove code that looks at m_childrenLoaded, since we don't
	need it any more (and in fact there's no way to set it any more).

	- fixed 3120578 -- REGRESSION: going to about:blank creates null view

	If no tokens are ever sent to the parser, then we end up without a render tree.

        * khtml/html/htmlparser.h: Add finished() function.
        * khtml/html/htmlparser.cpp: (KHTMLParser::finished): Make an HTML element if the document is still
	empty at this point. This is identical to what KHTMLParser::insertNode does when you insert any kind
	of element other than an HTML element.

        * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::end): Call finished() to let the parser know.

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Turn on the "paint red" feature in development builds.
	Null view problems are particularly hard to debug without something like this, and we don't care
	if development builds are ever-so-slightly slower. No change in deployment.

	- fixed 3121527 -- crash in WebCoreBridge frameBorderStyle

        * kwq/WebCoreBridge.mm: (-[WebCoreBridge frameBorderStyle]): Handle case where this is called and
	we don't have a KHTMLView yet.

	- other changes

        * WebCore.pbproj/project.pbxproj: Electron is doing his thing.

2002-12-08  David Hyatt  <hyatt@apple.com>

	Fix for image bullets.  They were neglecting to offset
	themselves by their own width, and were just relying on
	sheer luck (the default margin) to accommodate their
	size.  The bug is 3007040 (borkware.com).
	
        Reviewed by: gramps

        * khtml/rendering/render_list.cpp:
        (RenderListMarker::paintObject):

2002-12-07  David Hyatt  <hyatt@apple.com>

	This change fixes three bugs in list items.  

	(1) Stop implementing markers as floats.  This is simply
	wrong.  The bullet doesn't affect the height of the line
	box if it's a float, and it can also affect other
	list items that follow the bullet's enclosing list item
	(leading to odd staggered layout of lists).

	(2) Relax the DTD.  It was trying to obey strict HTML, which
	is hopeless in the case of lists.  Match the behavior of
	both Gecko and the IEs (mac and win32)  and allow non-list 
	content to be inserted between list items without being
	wrapped in its own list item.  Lists were making empty
	items for whitespace in between items, and this stops that
	and makes our lists behave much more like Gecko and the IEs.

	(3) The bullet's min and max width weren't getting set, which
	could lead to confused line width calculations when image
	bullets were used.
	
        Reviewed by: gramps

	* ChangeLog:
	* khtml/html/dtd.cpp:
        (DOM::checkChild):
        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):
        * khtml/rendering/render_list.cpp:
        (RenderListItem::setStyle):
        (RenderListMarker::calcMinMaxWidth):

2002-12-07  Ken Kocienda  <kocienda@apple.com>

        Reviewed by: Maciej

        Fix for this bug:

        Radar 3073988 (URLs with /../ are not resolved before being sent to the host)

        * kwq/KWQKURL.mm:
        (KURL::KURL):
        (copyPathRemovingDots): New function containing code that was pulled out of 
	the existing relative URL resolution code. 
        (KURL::parse): Call new copyPathRemovingDots function instead of doing same work
	inline.

2002-12-06  David Hyatt  <hyatt@apple.com>

	Sigh. I forgot to commit the first layer fix (that has already
	been reviewed), so now this is also including that.

	The first layer fix was to deal with the yale.edu crasher.
	It involved making sure that append/remove of render object
	trees drill down into those trees to remove/append corresponding
	layers (instead of just checking the root of the trees).

	The second fix involves making sure that cliprects are right
	for painting backgrounds and borders of clipped objects.
	Fixes benoit's bug.
	
        Reviewed by: mjs and darin (fix 1), mjs and gramps (fix 2)

        * khtml/rendering/render_container.cpp:
        (RenderContainer::removeChildNode):
        (RenderContainer::appendChildNode):
        (RenderContainer::insertChildNode):
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::appendLayers):
        (RenderObject::removeLayers):
        (RenderObject::enclosingLayer):
        * khtml/rendering/render_object.h:

2002-12-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Darin

	- fixed 3077227 - netflix "top 100" page JavaScript runs so
	slowly, it seems like a hang

	I fixed this by adding hash tables of image and form elements by
	name and id. This allows scans of the whole document to be avoided
	in many cases.

	This also results in a small speedup (~1%) on cvs-js-ibench.

        * khtml/dom/html_document.cpp:
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::hasProperty):
        (KJS::HTMLDocument::tryGet):
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::addNamedImageOrForm):
        (HTMLDocumentImpl::removeNamedImageOrForm):
        (HTMLDocumentImpl::haveNamedImageOrForm):
        * khtml/html/html_documentimpl.h:
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::attach):
        (HTMLFormElementImpl::detach):
        (HTMLFormElementImpl::parseAttribute):
        * khtml/html/html_formimpl.h:
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::parseAttribute):
        (HTMLImageElementImpl::attach):
        (HTMLImageElementImpl::detach):
        * khtml/html/html_imageimpl.h:

2002-12-06  David Hyatt  <hyatt@apple.com>

	Hack to make i-bench paint every fourth page.  We can tune
	this # as needed. 
	
        Reviewed by: darin

        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::close):
        * khtml/rendering/render_flow.h:

2002-12-06  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	Update to latest character-sets document.

        * kwq/character-sets.txt: Got the newest one and merged in our change.
        * kwq/KWQCharsetData.c: Regenerated this. Added just one character set name.

2002-12-06  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        * khtml/ecma/kjs_events.h: Add listenerObjImp() method so we don't have to
	ref/unref for speed-critical uses.

        * khtml/ecma/kjs_window.cpp: (Window::getJSEventListener): Change this
	to work with ObjectImp so we don't ref/unref each listener. This should give
	us some extra speed.

2002-12-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Darin Adler

	- made framework embedding work correctly with buildit

        * WebCore.pbproj/project.pbxproj: Give framework a relative
	install path, don't install it the normal way, and copy it
	manually to /AppleInternal/Library/Frameworks if installing. Also
	look for other frameworks in
	${DSTROOT}/AppleInternal/Library/Frameworks.

2002-12-06  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed 3111903 -- crash in DOM::HTMLDocumentImpl::close

        * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
	Check for the case where view() is 0 so we don't do a null-dereference.
	Also, remove some of the unneeded redundant isNull/isEmpty checking here.

2002-12-05  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3116149 -- REGRESSION: assert on invalid encoding trying to show accuweather.com source

	The regression was caused when we updated the View Source window to try to get the encoding right.

        * kwq/WebCoreBridge.mm: (+[WebCoreBridge stringWithData:textEncoding:]):
	Make this function decode the string as Windows Latin-1 if the passed-in encoding is
	invalid or ISO Latin-1, since that's what we always want.

        * kwq/mac-encodings.txt: Add "8859_1" since we have now seen it "in the wild".
        * kwq/KWQCharsetData.c: Check in new version of generated file.

2002-12-05  David Hyatt  <hyatt@apple.com>

	Fix for javadoc page.  It specified an invalid unit, and our
	unit match was on a substring, so it allowed "pts" when it
	shouldn't.  This patch adds some code to help handle this
	error case.

	Bug # is 3119830.
	
        Reviewed by: rjw

        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseUnit):

2002-12-05  Chris Blumenberg  <cblu@apple.com>

        Reviewed by: rjw

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge selectedString]): renamed to reflect WebDocument API change
        (-[WebCoreBridge deselectAll]): added
        (-[WebCoreBridge elementAtPoint:]): call selectedString

2002-12-05  David Hyatt  <hyatt@apple.com>

	Fix relative positioned elements to add in the right offset
	when repainting themselves.
	
        Reviewed by: darin

        * khtml/rendering/render_box.cpp:
        (RenderBox::repaintRectangle):

2002-12-05  Richard Williamson   <rjw@apple.com>

        Fixed two issues relating to font sizes.  Fixes any page
        that specifies font size in device independent units, i.e.
        www.abcnews.com.
         
        1.  Change dpi to 72.  Mac OS X does appear to assume 72, not 96!
        2.  Don't appply DPI adjustments to font selections, instead
        normalize values to points.  OS X takes care of device scaling.
        
        Reviewed by: gramps

        * khtml/css/css_valueimpl.cpp:
        (CSSPrimitiveValueImpl::computeLengthFloat):
        (CSSPrimitiveValueImpl::computePointFloat):
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssstyleselector.cpp:
        * kwq/KWQPaintDeviceMetrics.mm:
        (QPaintDeviceMetrics::logicalDpiY):

2002-12-05  David Hyatt  <hyatt@apple.com>

	Make sure that blocks with block children compute their
	minwidth and maxwidth correctly.  This fixes 4-5 bugs on my
	list, including the becblog.blogspot.com misrender and
	the wrapping list item on webstandards.org.

	The fix ensures that the margins of a child have been
	computed before they are asked for by the parent in
	calcBlockMinMaxWidth.

	Also fix a bug in collapsing margins that caused the height
	of positioned elements that contained only zero-height children
	to not compute their heights correctly.  We now pass tests 2
	and 3 on the collapsing margin tests with this fix.  
	
        Reviewed by: trey

	* khtml/rendering/render_flow.cpp:
	(RenderFlow::layoutBlockChildren):
	(RenderFlow::calcBlockMinMaxWidth):
	
2002-12-05  David Hyatt  <hyatt@apple.com>

	Fix for wsj.com orange underline regression.  In quirks mode
	only, don't let anchors without hrefs go into :hover.  This
	matches MacIE's behavior.

	The bug is 3118643.
	
        Reviewed by: mjs

        * khtml/rendering/render_object.cpp:
        (RenderObject::setHoverAndActive):
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.h:

2002-12-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: David Hyatt

	- fixed 3118083 - WebCore includes config.h from Labyrinth top level
	
	* Makefile.am: Regenerate config.h from top-level version, but
	make sure not to alter date if it has not changed.
        * config.h: Added (autogenerated but checked in for benefit of B&I).
        * ForwardingHeaders/config.h: Include WebCore copy rather than
	Labyrinth copy.

2002-12-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: David Hyatt

	- fixed 3049601 - support the equivalent of
	createcontextualfragment(NS6) or insertAdjacentHTML (IE)

	- fixed 3108065 - DHTML at expedia.com doesn't work-- lack of
	support for createContextualFragment

	- fixed 3114627 - DHTML menus used in Yahoo mail don't work-- lack
	of support for createContextualFragment

	- improvement towards 3052113 - "site menu" part of .mac home page
	editing doesn't work
	
        * khtml/ecma/kjs_range.h:
        * khtml/ecma/kjs_range.cpp:
        (DOMRangeProtoFunc::tryCall): Added suppor for
	createContextualFragment method.
        * khtml/ecma/kjs_range.lut.h: Regenerated.
        * khtml/dom/dom2_range.h:
        * khtml/dom/dom2_range.cpp:
        (Range::createContextualFragment): Implemented (calls impl).
        * khtml/html/html_elementimpl.h:
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): Factored out of setInnerHTML.
	(HTMLElementImpl::setInnerHTML): Call createContextualFragment to
	make the fragment.
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom2_rangeimpl.cpp:
        (RangeImpl::createContextualFragment): Implemented (calls start
	container element).

2002-12-04  David Hyatt  <hyatt@apple.com>

	Fix assert on compuserve page.  <form> under <table> should not
	get a layout() call.
	
        Reviewed by: gramps

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):

2002-12-04  David Hyatt  <hyatt@apple.com>

	Fix shroudedisles.com table misalignment by removing more\
	bogus rules from html4.css.

	Fix forums on macosx.com by implementing support for the align
	attribute on the <P> tag.

	Implement min-width and max-width for block level floating
	and normal flow elements.

	Fix event handling so that :hover notifications get through to
	objects inside floats.
	
        Reviewed by: rjw

        * khtml/css/html4.css:
        * khtml/html/html_blockimpl.cpp:
        (HTMLParagraphElementImpl::parseAttribute):
        * khtml/html/html_blockimpl.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidth):
        (RenderBox::calcWidthUsing):
        (RenderBox::calcHeight):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layoutBlockChildren):
        (RenderFlow::nodeAtPoint):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_frames.cpp:
        (RenderFrameSet::nodeAtPoint):
        * khtml/rendering/render_frames.h:
        * khtml/rendering/render_image.cpp:
        (RenderImage::nodeAtPoint):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_root.cpp:
        (RenderRoot::calcHeight):
        * khtml/rendering/render_style.cpp:
        (StyleBoxData::StyleBoxData):
        * khtml/rendering/render_text.cpp:
        (RenderText::nodeAtPoint):
        * khtml/rendering/render_text.h:

2002-12-04  Darin Adler  <darin@apple.com>

        Reviewed by Trey and Maciej.

	- fixed 3117558 -- Assertion failure in KWQKHTMLPart::slotData after typing "amazon.com" twice
	- got rid of the per-part NSEvent in preparation for NSView mouse event handling going through WebCore

        * khtml/khtml_part.h: Added declaration for didOpenURL.
        * khtml/khtml_part.cpp: (KHTMLPart::openURL): Changed name to didOpenURL in the APPLE_CHANGES
	version because calls to openURL from within KHTML need to make the round trip to WebKit.
	Also disabled the "scroll to anchor" part.

        * kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): Fix to return false when document is 0.

        * kwq/KWQKHTMLPart.h: Add scrollToAnchor, remove setCurrentEvent and _currentEvent
        * kwq/KWQKHTMLPart.mm:
        (KHTMLPart::openURL): Pass the openURL call to the KWQKHTMLPart.
        (KWQKHTMLPart::KWQKHTMLPart): Don't initialize _currentEvent.
        (KWQKHTMLPart::~KWQKHTMLPart): Don't release _currentEvent.
        (KWQKHTMLPart::submitForm): Pass [NSApp currentEvent] instead of _currentEvent.
        (KWQKHTMLPart::urlSelected): Pass [NSApp currentEvent] instead of _currentEvent.
        (KWQKHTMLPart::scrollToAnchor): Added. Contains the code from the anchor case inside
	KHTMLPart::openURL.

        * kwq/WebCoreBridge.h: Added scrollToAnchorWithURL:.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]): Change around so that we
	don't do a bunch of irrelevant stuff in the page cache case. I think we might just want to
	make a separate method for the page cache case.
        (-[WebCoreBridge scrollToAnchorWithURL:]): Added.
        (-[WebCoreBridge mouseUp:]): Simplify check for nil view. Remove calls to setCurrentEvent.
        (-[WebCoreBridge mouseDown:]): Simplify check for nil view. Fix event type constants for
	right mouse button and other mouse button.
        (-[WebCoreBridge mouseMoved:]): Simplify check for nil view.
        (-[WebCoreBridge mouseDragged:]): Simplify check for nil view.

2002-12-04  Richard Williamson   <rjw@apple.com>

        Cache the NSFont in QFont after doing family based lookup.
        Use that cached font to find a text renderer.

        Reviewed by: Darin

        * kwq/KWQFont.h:
        * kwq/KWQFont.mm:
        (QFont::QFont):
        (QFont::~QFont):
        (QFont::setFamily):
        (QFont::setFirstFamily):
        (QFont::setPixelSize):
        (QFont::setWeight):
        (QFont::setItalic):
        (QFont::getNSFont):
        * kwq/KWQFontMetrics.mm:
        * kwq/KWQPainter.mm:
        (QPainter::_updateRenderer):
        * kwq/WebCoreTextRendererFactory.h:
        * kwq/WebCoreTextRendererFactory.m:
        (-[WebCoreTextRendererFactory rendererWithFont:]):

2002-12-04  Richard Williamson   <rjw@apple.com>

        Cache the last used text renderer to avoid expensive lookup
        when font hasn't changed.

        Reviewed by: maciej

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::_updateRenderer):
        (QPainter::drawText):
        (QPainter::drawUnderlineForText):

== Rolled over to ChangeLog-2002-12-03 ==
